Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
Resource Conflicts

 
Post new topic   Reply to topic    Forum Index -> ZBasic Language
Author Message
mikep



Joined: 24 Sep 2005
Posts: 765
Location: Austin, TX

Posted: 28 December 2005, 22:15 PM    Post subject: Resource Conflicts Reply with quote

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:
  1. 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/)
  2. Use of Timer1 for I2C - use channel 0 or bit-banged I2C.
  3. Use of Timer1 for servo PulseOut - use separate servo controller or bit-bang output pulses
  4. Use of InputCapture and Timer1 for IR remote control input - no simple avoidance except to use custom interface chip (i.e. AT90S2313).
  5. Use of 4066 quad analog switch to switch between multiple serial ports and share single COM1 resource.
  6. 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: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> ZBasic Language Time synchro. with the server - Timezone/DST with your computer
Page 1 of 1

 


All content Copyright © 2005-2012 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group