Re: 8051 and a C switch statement
- From: Martin Griffith <mart_in_medina@xxxxxxxx>
- Date: Sat, 29 Dec 2007 12:08:53 +0100
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
.
- Follow-Ups:
- Re: 8051 and a C switch statement
- From: Arlet Ottens
- Re: 8051 and a C switch statement
- References:
- 8051 and a C switch statement
- From: Martin Griffith
- Re: 8051 and a C switch statement
- From: Wayne Farmer
- 8051 and a C switch statement
- Prev by Date: Re: 8051 and a C switch statement
- Next by Date: Re: 8051 and a C switch statement
- Previous by thread: Re: 8051 and a C switch statement
- Next by thread: Re: 8051 and a C switch statement
- Index(es):
Relevant Pages
|