Displaying "digits" On Alpha-numeric Displays
Hi Folks... yes.. I am a pensioner.. learning, how to use PIC / AVR processors.. for various little projects... that are really very simplistic.
One such project.. is to display some numbers on 4 alpha-numeric displays, which are common cathode.. and have segment annotations, from A through to F.. then G1,G2, then H - M ... So what I have is that in FLOWCODE, one can have "great fun", setting up PORTS, and 'parts of a PORT', to get enough I/O to drive the segment LED's in the display.. If I use C-code.. I expect to be able to really "in a flash" create a setup of.. sorts that can drive normal 7-segment.. displays.. with only 7 segments...!!
Now in my project.. I need to drive all segments of an alpha-numeric display.. but with differing requirements on the segments of the LED's..
So what I did was to use FLOWCODE ver 6... and I would simply create a LOOKUP TABLE.. with '1's and '0's... which would form the numbers I would be wanting to display on the 7-segment displays.. I would do this via the SWITCH decision option... so that if the number I wanted on the TENS position... (1st display in a series of 4)... was say 3... then I would read-off the LOOKUP TABLE... of number 3... and then fill up the relevant array..
As in FLOWCODE... the only way you can "talk" to a PORT BIT directly, is to use the said functionality.. in which you would place an INPUT / OUTPUT icon... say the OUTPUT icon.. and then you select either... a '0' or a '1' ... or you can select a setup variable... to carry the '1' or the '0'.. so in my project.. because FLOWCODE is a 'little slow'... and you really cannot do exactly as you want to.. or would in C-code.. you can only 'print' to a PORT.. by loading all the I/O's.. and then either dumping to that PORT... which would be the same as the way we would serially address the PORT... a BIT at a time.. 'serial address' means that to output to a PORT .. either as a PORT... or in a BITWISE mode... by creating the FLOWCODE diagrams..
So now.. I have the problem of the aplha-numeric display.. which requires that more than one total PORT is used.. and so I need like a further 8 I/O's.. to create the number I want to display... Is there a simple way in C-code.. that I can 'fill' a full PORT.. and then singular PORT BITS.. like in ONE GO...!!??
I expect there is..!!..could someone show me the code for that please... because once I have that 'compiled'.. it's time to 'output print' these PORTS.. and characters.. to the said alpha-numeric display...
Post a reply to Spencer
Think you can help Spencer ? Then post your thoughts that might help Spencer. You will earn a lot of reputation in the technical community.