[chbot] gcbasic/bootloader progress FYI.

Chris Hellyar chris at trash.co.nz
Sun Mar 9 00:50:32 GMT 2008


Hi-ho,

Waffly email :-).

Well, I've now written a 4x40 LCD serial controller in GCbasic, which
gives me enough playing with it to say that it's a good thing, although
some of the in-built libraries gave me pain during the process, and I
discovered a parameter parsing error which the author of gcbasic has
fixed already.. (he's really on the ball)

Being able to use in-line assembler utilising the basic jump
points/labels/variables is nice, the simple RS232 routines I wrote used
asm for their bulk, and the gcbasic 'wait' command for the bit delay, so
I didn't have to muck around writing that.  (The in-built rs232 library
gave me some odd results)

As I said in a previous email I used 'tiny bootloader' for the
bootloader, which works well.  It only takes 100 words in upper memory,
and the standard first 4 words for the re-direct.

The down side of being so small is that it isn't perfect, I've had the
boot loader overwrite itself a few times, which is really, really,
really, really, really annoying.  Did I mention annoying?  Mainly
because I didn't put an ICSP connector on the vero-board prototype.

The documentation on the authors site says: "TinyBootloader was build
with the idea that all the hard work could be moved to the PC
application,"

Well, that's true, there is no bounds checking in the PIC code.  I'm
going to email the author and check that it's OK if I 'redistribute' a
modified version with bounds checking.  His license terms are not
completely clear.

Either that or I'll write my own, having now played a fair bit with Tiny
Bootloader and tested another couple it's fairly trivial.  Tiny
Bootloader was the pick of the bunch for the gui end of the equation by
a long shot from what I tested.

The over-write problems are probably due to serial errors (default baud
rate is 115k) and it just overwrites the first four or last 100 words
with the erroneous data received.  Reducing the baud rate would probably
fix it, which would also remove the need for the ST232 on the board, but
then that's not fixing the problem, more making it go away. :-).

(I've also used mplab and gputils to create asm code for PIC using the
boot loader, and both work with no issues)

And on the module side:

http://www.cpix.co.nz/myio/V2-3d.png

After a bit of discussion back and forward we changed it to use a 26pin
IDC connector rather than a SIP arrangement, although I'll probably
change it to a 28, as I can't get 26 pin IDC Dip sockets cheaply which
will be handy as a termination for a ribbon cable onto verboard /
breadboard.

It's now got a jumperable LED on one pin for the flashing LED  'Hello
World', a screw-connector for power, a power LED, and DB9 on board.
It's got only slightly larger for the extra bits.  (3"x1.8") Although
might get smaller when the DB9's turn up, as the ones I based the PCB on
where the standard library ones, and the dimensions for the real item is
quite a bit smaller.

Given that a few of the list members are playing with the propeller
boards etc, these are a bit on the low-spec side, but for what I'm
interested in currently (Industrial control/automation) they are a
sledgehammer, particularly with a 18f2431 @ 40Mhz instead of the 16f876a
@20Mhz which I've been testing with.

Next: fix the bootloader issues and get some boards done. :-).

Cheers, Me.




More information about the Chchrobotics mailing list