CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

output_bit & delay question

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
javi.ar



Joined: 17 Feb 2006
Posts: 59
Location: Argentina

View user's profile Send private message Send e-mail Visit poster's website MSN Messenger

output_bit & delay question
PostPosted: Mon Jul 24, 2006 3:08 pm     Reply with quote

Hi:

I have a question (newbie of course) regarding output_bit,
I need to place hex "words" bytes on a pin, this should be 1 = 50us high & 50us low and 0 = 100us high & 100us low.
Is the only chance to use the delay_us() command for keeping the port high & low in conjuntion with output_bit. I´ve tried with PWM and compare but I had no succeded (yet).

Thanks a lot.
Iam using 18f452 with 4MHZ XTAL and 8MHZ clock. but none of this is mandatory... just testing and learning, the goal is develop a dcc command / decoder for scale trains . Thanks a lot in advance as usual...
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jul 24, 2006 5:00 pm     Reply with quote

Quote:
Is the only chance to use the delay_us() command for keeping the port high & low ?

Look at the CCP and ECCP Tips 'n Tricks document from Microchip.
See Tip #8 for an idea of the general concept.
http://ww1.microchip.com/downloads/en/DeviceDoc/41214a.pdf
javi.ar



Joined: 17 Feb 2006
Posts: 59
Location: Argentina

View user's profile Send private message Send e-mail Visit poster's website MSN Messenger

PostPosted: Mon Jul 24, 2006 5:36 pm     Reply with quote

Thanks a lot...
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group