programming 8 character LED with C8051F022

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
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


Re: programming 8 character LED with C8051F022

Quoted text here. Click to load it

Correct 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
We've slightly trimmed the long signature. Click to see the full one.
Re: programming 8 character LED with C8051F022
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.


Re: programming 8 character LED with C8051F022

Quoted text here. Click to load it

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
We've slightly trimmed the long signature. Click to see the full one.
Re: programming 8 character LED with C8051F022
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


Re: programming 8 character LED with C8051F022

Quoted text here. Click to load it

There 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


Re: programming 8 character LED with C8051F022
Thanku so much...i appreciate the help
Methi


Site Timeline