Re: 8051 and a C switch statement



On Sat, 29 Dec 2007 02:23:09 -0800 (PST), in comp.arch.embedded Wayne
Farmer <usenet@xxxxxxxxxxxxxxxxxxx> wrote:

On Dec 28, 4:39 pm, Martin Griffith <mart_in_medina@xxxxxxxx> wrote:
Got  a 4k8 serial biphase signal being decoded by a at85c52 with an
external non retrig monostable (hc221), and I'm running out of time
occasionally waiting for the generic 2*8  LCD to clear it's busy flag.
The LCD is fed with the info from the incoming biphase

To reduce the "reaction time" I could use  a long switch statement on
the signal's clock interrupt bitcount from the sync word, 80 per
frame, do just a little bit each interrupt.

The real question is

" how big can I make the switch statement?"
Whats the limit?
I'm using the rasionance C compiler.

'scuse typos, a bottle of wine was preferable to staring at my
lamentable code

martin

I'm guessing that you're writing to the LCD in an interrupt routine.
If waiting for the LCD busy signal to drop is creating a problem for
you, then perhaps you should be writing to the LCD in background,
rather than foreground.

Or, if the LCD is busy, why not just push the LCD data into a FIFO and
perform the access at some time in the future?

Updating an LCD shouldn't be that time-critical an affair.

Yes, that is what I'm trying to do.
After a night's sleep, it is a lot clearer now.
The biphase signal is just a bunch of 8 bit characters and a sync word

I hope to use the clock from the biphase decoder, which are about
250uS apart, to just send one command to the LCD when required instead
of trying to enter a complete string at once, and ignoring the busy
flag, as 250uS should be ample, as my scope shows about 10uS is
required for the busy flag to be cleared.

One less thing to worry about.

Thanks


martin
.



Relevant Pages

  • Re: 8051 and a C switch statement
    ... occasionally waiting for the generic 2*8  LCD to clear it's busy flag. ... do just a little bit each interrupt. ... I'm guessing that you're writing to the LCD in an interrupt routine. ...
    (comp.arch.embedded)
  • Re: I/O signal conditioning question
    ... The display multiplexes its "BUSY" signal on the same pin as ... My problem is that the PIC input pin cannot see the 2.4v BUSY signal. ... What is the LCD display Vdd? ...
    (sci.electronics.design)
  • Re: I/O signal conditioning question
    ... I am working on the interface between an LCD display and ... My problem is that the PIC input pin cannot see the 2.4v BUSY signal. ... The PIC now can see this fine, but when the LCD switches the pin ...
    (sci.electronics.design)
  • Re: Additional Hardware Module with Xilinx MicroBlaze Processor
    ... Your busy signal needs be high when it can't accept a new word even ... You can write to the fsl interface with the function putfslx, ... I would also like to use the LCD ... What I would like to do is define a GPIO port on the processor to ...
    (comp.arch.fpga)
  • Re: Additional Hardware Module with Xilinx MicroBlaze Processor
    ... MicroBlaze have plenty of options for the FSL instructions, ... a new word in one clock cycle when busy is low. ... I would also like to use the LCD ... What I would like to do is define a GPIO port on the processor to ...
    (comp.arch.fpga)