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

low - high + interrupt

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



Joined: 28 Sep 2007
Posts: 13

View user's profile Send private message

low - high + interrupt
PostPosted: Tue Oct 02, 2007 12:31 pm     Reply with quote

Hi !
How to read out this low - high sample:
L- L- L- H- H- H- H- L- L- H- H- L- L- H- H

Maybe with some interrupt routine ?
The chip that am using is 16F877.

Alan
Alanis



Joined: 28 Sep 2007
Posts: 13

View user's profile Send private message

PostPosted: Thu Oct 04, 2007 4:58 am     Reply with quote

Hi guys !

Do you have and idea how to make this ?
In general, i dont know how to define that L-H read out.
e.g. how to read the levels if i get 3 time L L L or H H H ...

Alan
p.s. incoming data is passed at speed of 9600 B/s.
Guest








PostPosted: Thu Oct 04, 2007 5:21 am     Reply with quote

Setup a timer with the correct speed and enable interupt.
Att each interrupt read the value from the actual pin.
Start the timer in the middle of the first bit.
To do this you must have a reference, i.e. start bit or something like that to know when to start.
Alanis



Joined: 28 Sep 2007
Posts: 13

View user's profile Send private message

PostPosted: Fri Oct 05, 2007 3:04 am     Reply with quote

Setup a timer with the correct speed and enable interupt.
-If my internal ring oscillator is 8 MHZ, what is the correct timer setup ?

Start the timer in the middle of the first bit.
- I dont understand this part....
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