Hi, I am using the Cygnal C8051F022 for the first time and have some background with C programming. I dont know where to start off with progamming an 8 character LED with C8051F022 though. Can anybody give me some ideas about this. Would be very helpful.Thanks, Methi
programming 8 character LED with C8051F022
Started by ●April 20, 2005
Reply by ●April 21, 20052005-04-21
methi wrote:>Hi, >I am using the Cygnal C8051F022 for the first time and have some >background with C programming. I dont know where to start off with >progamming an 8 character LED with C8051F022 though. Can anybody give >me some ideas about this. Would be very helpful.Thanks, >MethiCorrect answers to your question depend entirely on how the LED display is connected to your 8051. Is it, for example, connected using memory or I/O mapped latches, or serially using SPI or I2C, or some other method? -- ======================================================================== Michael Kesti | "And like, one and one don't make | two, one and one make one." mkesti@gv.net | - The Who, Bargain
Reply by ●April 22, 20052005-04-22
Hi....The 8051 is connected to the LED display via the data bus (port 7)...which are pins 65-72...this is an 8 bit buffer going to the 8 character LED display....there are also read,write and other control signals going to the LED display.
Reply by ●April 22, 20052005-04-22
methi wrote:>Hi....The 8051 is connected to the LED display via the data bus (port >7)...which are pins 65-72...this is an 8 bit buffer going to the 8 >character LED display....there are also read,write and other control >signals going to the LED display.It would seem, then, that your display is memory-mapped, especially if some of those "other control bits" are address bits from P5/P6. You would therefore write to it as you would write to any specific address. For example, in C you might initialize a pointer to the desired address and assign the desired data to the dereferenced pointer value. In assembler you might initialize DPTR to the desired address and use the MOVX instruction. There are probably other ways, too. The data that you write depends on the nature of the display. If it's just a series of latches, one per digit driving 7-segment displays, you will need to write bit patterns that light specific display segments, perhaps using a lookup table to translate numerals to those patterns. If, on the other hand, there is some sort of display controller involved, the data that need to be written are specified by that controller's spec sheet. As you can see, there is far more to be known about your display to give you specific advice. -- ======================================================================== Michael Kesti | "And like, one and one don't make | two, one and one make one." mkesti@gv.net | - The Who, Bargain
Reply by ●April 25, 20052005-04-25
Hi Michael, Thankyou very much. The display that I am using is PDSP1883. What you have explained seems clear enough. I have one question for you. Do you have any idea about "readback" feature in 8051...Is it possible to readback the program from the cygnals 8051.. Thanks
Reply by ●April 28, 20052005-04-28
On 20 Apr 2005 10:01:57 -0700, "methi" <gmethi@gmail.com> wrote:>Hi, >I am using the Cygnal C8051F022 for the first time and have some >background with C programming. I dont know where to start off with >progamming an 8 character LED with C8051F022 though. Can anybody give >me some ideas about this. Would be very helpful.Thanks, >MethiThere should be some registers that enables one to switch on/off each LED of the display individually. So in general to display a specific character on the display one has to map a character to information on which individual LEDs should be on/off. This information must then be written to the display registers to actually switch the specific LEDs on/off. So write a routine that can switch specific LEDs. Generate the data on which set of LEDs should be on in a character to represent a specific character. Write a routine that takes a character e.g. '3' as input. Fetches the data that represents a '3' on the LED display, and update the display registers to switch on the LEDs that represent a '3'. Depending on the exact hardware, some or all of this might be done in the diplay. To save pins, the LEDs might be multiplexed in which case one has to drive a specific LED only for a short period before driving the next. This must be done fast enough so that all the 'ON' LEDs appear on at the same time. Hope this helps Regards Anton Erasmus
Reply by ●April 28, 20052005-04-28
Reply by ●April 29, 20052005-04-29
methi wrote:> Hi, > I am using the Cygnal C8051F022 for the first time and have some > background with C programming. I dont know where to start off with > progamming an 8 character LED with C8051F022 though. Can anybody give > me some ideas about this. Would be very helpful.Thanks, > MethiYou should start off reading the data sheet thoroughly and before that it would be a good idea to read the 8051 bible which can be found at 8052.com. A plain vanilla 8051 has four 8 bit ports that can be used as inputs or outputs so one or more of these hould be considered for your application. I am not clear what you mean by an 8 character LED display - is it a single 8 segment display or 8 of these or can it actually display characters as opposed to just numbers? Ian
Reply by ●May 3, 20052005-05-03
Reply by ●May 3, 20052005-05-03