Jeremy Leach
Senior Member
Hi
I've got an interesting problem forming, which I'll let you get your teeth into ;-)
I've got one PicAxe dedicated to handling button pushes to control a AXE033 LCD. It's displaying all sorts of sensor readings. I've just worked out that there's ideally 29 different 'screens' of information I want to display. I've worked out a table in Excel of all the attributes relating to each screen, such as screen name, value to be displayed, units of measurement, etc etc.
I think the elegant solution to control the LCD display would be to contain a representation of this table in the PicAxe. With generic routines to extract the data from the table and display the appropriate screen.
The other option would be to have horrendously messy code covering each screen and what it contains.
I'm really talking about arrays of data. What is a good method on a PicAxe of implementing an array?
Also, parts of the table contain little information, so I need to think of efficiently packing the information in memory somehow. What comes to mind is a storage system using marker bytes to indicate field data boundaries and locating table fields by scanning from the start. Not very efficient in execution speed, but I'm hoping that as it's only for LCD screens the PicAxe will be more than capable of doing this fast enough.
I'd be interested in any tips or views here and what other people have done when using arrays.
Edited by - jeremy leach on 3/31/2005 9:24:57 PM
I've got an interesting problem forming, which I'll let you get your teeth into ;-)
I've got one PicAxe dedicated to handling button pushes to control a AXE033 LCD. It's displaying all sorts of sensor readings. I've just worked out that there's ideally 29 different 'screens' of information I want to display. I've worked out a table in Excel of all the attributes relating to each screen, such as screen name, value to be displayed, units of measurement, etc etc.
I think the elegant solution to control the LCD display would be to contain a representation of this table in the PicAxe. With generic routines to extract the data from the table and display the appropriate screen.
The other option would be to have horrendously messy code covering each screen and what it contains.
I'm really talking about arrays of data. What is a good method on a PicAxe of implementing an array?
Also, parts of the table contain little information, so I need to think of efficiently packing the information in memory somehow. What comes to mind is a storage system using marker bytes to indicate field data boundaries and locating table fields by scanning from the start. Not very efficient in execution speed, but I'm hoping that as it's only for LCD screens the PicAxe will be more than capable of doing this fast enough.
I'd be interested in any tips or views here and what other people have done when using arrays.
Edited by - jeremy leach on 3/31/2005 9:24:57 PM