Subject:
|
LCD and interrupts
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Tue, 11 Mar 1997 21:35:56 GMT
|
Original-From:
|
Randy Sargent <rsargent@newtonlabs.comSTOPSPAM>
|
Viewed:
|
2407 times
|
| |
 | |
> Basically systick runs every millisecond (as long as you don't
> print to the LCD which disables interrupts while writing)
Actually, that's not quite true. The systick interrupt always runs, and
LCD writing happens as _part of_ systick. Any interrupt, by default,
disables further interrupts until it's done. Systick is actually
different, because it re-enables interrupts during some of its tasks (since
it's pretty long as far as interrupts go). Interrupts are off for parts of
systick, including the LCD writing routine, which is in fact extremely
fast and doesn't block.
If you think that something in your system is keeping interrupts off for
too long, try the following experiments:
1) Check out msleep() and see if it drifts relative to an outside time
source. If you're keeping interrupts off for over a millisecond, you'll
start to lose ticks in msleep() (since it's run by systick). I've never
seen this happen, other than once or twice when someone wrote some rather
blatantly bad asm routines.
2) Play tones. A tone of frequency F requires interrupts to be serviced at
frequency 2*F or else you'll hear the tone start to break up. (Playing
high-frequency tones is what originally prompted us to turn interrupts back
on during most of systick in fact)
-- Randy
----------------------------------------------------------------
Randy Sargent Newton Research Labs
Senior Design Engineer Robotic Systems and Software
rsargent@newtonlabs.com http://www.newtonlabs.com/
|
|
1 Message in This Thread: 
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|