Doesn't information require at least 1 byte.. such as the size of an int ... > On Sat, 17 Mar 2001, J.A.YOUNG wrote: > > > I am writing a program in Hitech PIC C-Lite (under MPLAB) for a PIC16F84. The > > aim is to get a micromouse to the middle of a maze. The maze data is stored in > > an array, which for a full size maze must be ~33*33. > > > > At the moment I get errors if I use an array bigger than 7*5. Something about > > words and BANK0- memory things. I saw something in the archive about > > limitations on memory, but it didn't help. Do I need to use a number of PICs or > > can I use a different method. > > Are you using one *byte* per maze unit, or one or more *bits*? You'll > need 1098 bytes if you do it that way, but you could use, say, one or two > bits per unit and fit it in much less space. > > I know I saw something on this recently, but darned if I can remember what > or when. You might want to check the list archives. All I can figure out > with five minutes' thought is to use three bits per cell (you already know > the way you got into your current position is open), which would still > require 363 bytes. You could use an external EEPROM and get all the space > you need and more. > > > I also need to set up an interrrupt on a port, so that when the sensory data > > changes, I can call a routine. > > You can use PORTB interrupt on change for that, or use the INT/RB0 pin, or > just set up TMR0 to interrupt on a regular basis and check the sensors > then. > > > My C is fairly basic and my assembler is non-existent. Any help or > > ideas would be great. > > My advice would be to work out the logic of finding your way through the > maze first. Once you have that figured out, do some reading up on the > 16F84 to make sure you understand the limitations and opportunities > offered by the hardware. Then work on your programming skills to > translate that into a program. Make the program fit the method, not vice > versa. If it turns out you simply can't make it fit in a 16F84, look at > external serial EEPROM, the 16F628 or a 16F87x processor. > > Hope this helps a little, and good luck! > > Dale > --- > The most exciting phrase to hear in science, the one that heralds new > discoveries, is not "Eureka!" (I found it!) but "That's funny ..." > -- Isaac Asimov > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu