|
|
| Author |
Message |
mikep
Joined: 24 Sep 2005
Posts: 765
Location: Austin, TX
|
|
Posted: 28 December 2005, 22:15 PM Post subject: Resource Conflicts |
|
|
I think it would be useful to have some application notes for techniques to resolve resource conflicts around interrupts, com ports and timer1. These conflicts occur when you are trying to use multiple facilities at once and usually don't apply to simple toy programs or examples.
Conflict resolution is either going to be by avoidance (i.e. employing some other technique) or by sharing (i.e. using a semaphore with Register.Timer1Busy to know when Timer1 is busy).
Here are some examples:
- Use of Timer1 to create dual PWM output - use separate PWM generator (see my PWM controller on http://home.austin.rr.com/perks/micros/Projects/)
- Use of Timer1 for I2C - use channel 0 or bit-banged I2C.
- Use of Timer1 for servo PulseOut - use separate servo controller or bit-bang output pulses
- Use of InputCapture and Timer1 for IR remote control input - no simple avoidance except to use custom interface chip (i.e. AT90S2313).
- Use of 4066 quad analog switch to switch between multiple serial ports and share single COM1 resource.
- Use of 8-bit I/O expander PCF8574 to handle multiple interrupts and share use of one ZX interrupt pin.
|
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR
|
|
Posted: 30 December 2005, 3:52 AM Post subject: |
|
|
The list that Mike presented is a good start. Here is another observation.
Timer1 is not used when ShiftInEx() and ShiftOutEx() are invoked without speed regulation (flags bit 2 = 0). |
|
| Back to top |
|
 |
|