> Thanks very much to all for the array size stuff, I'm using the bit
> array to
> store my potentials and wall data, so cutting down on memory, but will
> put in
> my project that another type of chip would be more appropriate.
>
> <using HiTech PICC-LITE under MPLAB for a PIC16F84A>
>
> For the current pic i'm going to use the dead simple
> 'follow-the-left-hand-
> wall' technique. I've written the basic code, but at the moment its a
> case
> of "move 1 square, stop. read sensors. go again", so I'm trying to
> setup an
> interrupt on RB0 so that when the Left-Hand Sensor changes, I can jump
> to the
> decision code.
>
> As yet my program runs and compiles but doesn't do anything on a
> change to B0.
> I've kind of pieced the code I need together from the PICCLITE manual
> and other
> tutorials, and can see there's stuff about option registers, but
> nothing I've
> tried has made a difference. Code to try out the interrupt is below.
>
> void interrupt sensor()
> {
> int i;
> PORTA=255;
> for (i=40;i--;) continue;
> }
>
> main()
> {
> TRISA=0;
> TRISB=3;
>
> //OPTION=192; tried fiddling with this code but I'm
> just
> //INTCON|=(1<<GIE); guessing really...
>
> for (;;)
> {
> PORTA=0;
> }
> }
>
> Simple stuff no doubt, but any ideas??? cheers,
> john
>
> --
>
http://www.piclist.com hint: The PICList is archived three different
> ways. See
http://www.piclist.com/#archives for details.