Menu

Bootloader, MarkIII Problems

Help
2008-10-27
2013-05-30
  • Nobody/Anonymous

    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

     
    • Hugh Considine

      Hugh Considine - 2008-10-28

      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.

       
    • kent_twt4

      kent_twt4 - 2008-10-28

      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

       
    • Nobody/Anonymous

      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

       
    • Nobody/Anonymous

      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

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.