Hi All,
I've been dabbling for a few years with PBPro, but still find certain programming methods a challenge.
My main question: Is there a 'preferred order' to layout programming code/loops/nesting within nests etc.
For example, i might have a 16x2 LCD, a few buttons (or keypad), a few leds, switches or rotary encoder and/or a few external lines to the outside world.
I wanted to know what is the best method to organise my code so everything is running smoothly.
Quite often when i press buttons or spin a rotary encoder, my LCD won't update, or doing one thing will delay the operation of another and so on....
I'd assume my buttons/keypad/rotary encoders should be HIGHer importance in looping, and the LCD, serout/control-lines out would be of lower importance?
Obviously my loops need to be sorted in way from MOST important to LEAST important with repspect to running in realtime or at leisure.
I know someone will say "use an interupt" but i haven't got that deep into using interupts yet...
Thanx in advance,
Marty.
Bookmarks