Hi, I'm Italian, so i speak a very bad english.
I'm in trouble because I have a MarkIII board with a bootloader on.
I've searched and read all i found on the forum, but never of what i do worked.
I've tried this:
'blink led test
#chip 16F877, 20
#option bootloader
goto main
org 0x0004
'start of main loop
main:
' your code
goto main
but the compiler returns me:
Great Cow BASIC (0.9 10/2/2007)
Sto compilando C:\Programmi\GCBASIC\Demos\Text2.txt ...
Si Þ verificato un errore:
Text2.txt (10): Errore di sintassi
Il messaggio Þ stato registrato nel file C:\PROGRA~1\GCBASIC\ERRORS.TXT.
Premi un tasto per continuare
Maybe this works with previous releases of GCBasic, i don't know.
Please help me, thanks a lot
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Try removing the org 0x0004, GCBASIC will add that automatically.
I don't know if that's what GCBASIC is complaining about there, but the rest of the program looks good.
You might want to try the latest release of GCBASIC, at http://gcbasic.sourceforge.net/newfiles/update.zip . Some errors might show about "message not found" when it tries to read the Italian messages.dat file, but you can ignore them or try the English translation.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
One thing about bootloaders is that they may be pre-configured for a particular platform (i.e. Osc, MCLR, TRIS, etc.). If thats the case, then writing to the config registers should be allowed to opt out in bootloader mode?
Here is some test code for the Mark III if you don't already have some.
LineR = ReadAD(AN5)
LineC = ReadAD(AN6)
LineL = ReadAD(AN7)
If LineR > 175 Then Set FollowerR Off
If LineR < 100 Then Set FollowerR On
If LineC > 175 Then Set FollowerC Off
If LineC < 100 Then Set FollowerC On
If LineL > 175 Then Set FollowerL Off
If LineL < 100 Then Set FollowerL On
;If (EyeR AND EyeL) > 80 Then FullFwd
If EyeR > (EyeL + 50) Then SoftRightFwd
If (EyeR AND EyeL) > 100 Then FullReverse
Sub FullFwd ;Charge!
PulseOut RServo,1 ms
Nop ;Need some delay here for PulseOut to work
PulseOut LServo,2 ms
wait ServoPeriod ms
end sub
Sub SoftRightFwd
PulseOut RServo,142 10us ;Need to re-zero pot
Nop ;Need some delay here for PulseOut to work
PulseOut LServo,2 ms
wait ServoPeriod ms
end sub
Sub FullReverse ;Avoid
PulseOut RServo,2 ms
Nop ;Need some delay here for PulseOut to work
PulseOut LServo,1 ms
wait ServoPeriod ms
end sub
goto Main
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
nothing to do, i'm too noob to solve the problem. I have tried removing the org 0x0004 but then the bootloader returns an error probably because i'm trying to write a location dedicated to itself.
I have also tried to modify the asm as shown here: http://www.dontronics.com/rfarmer/checklist.htm
but asm is a little bit too hard for me.
anyhow thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Personally I think bootloaders are a pain, are inflexible, and have crummy interfaces. Supposedly you need to change the reset to Org 3 for the Picloader. GCBasic continues to set it at Org 0. Also you are not allowed to set the config, as it is done in the bootloader for a specific Osc and such. GCBasic will continue to set the default config for your device.
There must be a dozen or more instances of PIC bootloaders out there. In order for the PICLoader to work, a change to the GCBasic.bi file to fit your bootloader would be required.
Hi, I'm Italian, so i speak a very bad english.
I'm in trouble because I have a MarkIII board with a bootloader on.
I've searched and read all i found on the forum, but never of what i do worked.
I've tried this:
'blink led test
#chip 16F877, 20
#option bootloader
goto main
org 0x0004
'start of main loop
main:
' your code
goto main
but the compiler returns me:
Great Cow BASIC (0.9 10/2/2007)
Sto compilando C:\Programmi\GCBASIC\Demos\Text2.txt ...
Si Þ verificato un errore:
Text2.txt (10): Errore di sintassi
Il messaggio Þ stato registrato nel file C:\PROGRA~1\GCBASIC\ERRORS.TXT.
Premi un tasto per continuare
Maybe this works with previous releases of GCBasic, i don't know.
Please help me, thanks a lot
Try removing the org 0x0004, GCBASIC will add that automatically.
I don't know if that's what GCBASIC is complaining about there, but the rest of the program looks good.
You might want to try the latest release of GCBASIC, at http://gcbasic.sourceforge.net/newfiles/update.zip . Some errors might show about "message not found" when it tries to read the Italian messages.dat file, but you can ignore them or try the English translation.
One thing about bootloaders is that they may be pre-configured for a particular platform (i.e. Osc, MCLR, TRIS, etc.). If thats the case, then writing to the config registers should be allowed to opt out in bootloader mode?
Here is some test code for the Mark III if you don't already have some.
'Chip model
#chip 16f877A,20
'Setup 4 bit LCD
#define LCD_IO 4
#define LCD_DB4 PORTD.4
#define LCD_DB5 PORTD.5
#define LCD_DB6 PORTD.6
#define LCD_DB7 PORTD.7
#define LCD_RS PORTD.1
#define LCD_RW PORTD.2
#define LCD_Enable PORTD.3
Dir PortD out
'Setup Servo's
#define RServo PortB.1
#define LServo PortB.2
#define ServoPeriod 18 ;60hz refresh
Dir PortB.1 out
Dir PortB.2 out
#define FollowerR PortC.0
#define FollowerC PortC.1
#define FollowerL PortC.2
Dir PortC.0 out
Dir PortC.1 out
Dir PortC.2 out
Main:
cls
EyeR = ReadAD(AN2)
LCDInt(EyeR) ;EyeR
Print " "
EyeL = ReadAD(AN3)
LCDInt(EyeL) ;EyeL
Wait 3 10ms
LineR = ReadAD(AN5)
LineC = ReadAD(AN6)
LineL = ReadAD(AN7)
If LineR > 175 Then Set FollowerR Off
If LineR < 100 Then Set FollowerR On
If LineC > 175 Then Set FollowerC Off
If LineC < 100 Then Set FollowerC On
If LineL > 175 Then Set FollowerL Off
If LineL < 100 Then Set FollowerL On
;If (EyeR AND EyeL) > 80 Then FullFwd
If EyeR > (EyeL + 50) Then SoftRightFwd
If (EyeR AND EyeL) > 100 Then FullReverse
Sub FullFwd ;Charge!
PulseOut RServo,1 ms
Nop ;Need some delay here for PulseOut to work
PulseOut LServo,2 ms
wait ServoPeriod ms
end sub
Sub SoftRightFwd
PulseOut RServo,142 10us ;Need to re-zero pot
Nop ;Need some delay here for PulseOut to work
PulseOut LServo,2 ms
wait ServoPeriod ms
end sub
Sub FullReverse ;Avoid
PulseOut RServo,2 ms
Nop ;Need some delay here for PulseOut to work
PulseOut LServo,1 ms
wait ServoPeriod ms
end sub
goto Main
nothing to do, i'm too noob to solve the problem. I have tried removing the org 0x0004 but then the bootloader returns an error probably because i'm trying to write a location dedicated to itself.
I have also tried to modify the asm as shown here:
http://www.dontronics.com/rfarmer/checklist.htm
but asm is a little bit too hard for me.
anyhow thanks
Personally I think bootloaders are a pain, are inflexible, and have crummy interfaces. Supposedly you need to change the reset to Org 3 for the Picloader. GCBasic continues to set it at Org 0. Also you are not allowed to set the config, as it is done in the bootloader for a specific Osc and such. GCBasic will continue to set the default config for your device.
There must be a dozen or more instances of PIC bootloaders out there. In order for the PICLoader to work, a change to the GCBasic.bi file to fit your bootloader would be required.
Do you have a programmer, small piece of perfboard, 6 pin .100" header, some wire, and soldering iron? For full control over your MarkIII you can program a bare PIC, or simply erase your 16f877 for use. On Yahoo minisumoMarkIII Groups, I have downloaded a PICkit 2 (Or?) programmer mod for the Mark III here: http://tech.groups.yahoo.com/group/MiniSumoMarkIII/message/5517
Pictures downloaded here: http://tech.ph.groups.yahoo.com/group/MiniSumoMarkIII/photos/browse/384d
Kent