View Single Post
  #3   Spotlight this post!  
Unread 17-10-2005, 20:47
sciguy125 sciguy125 is offline
Electrical Engineer
AKA: Phil Baltar
FRC #1351
Team Role: College Student
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Sunnyvale, CA
Posts: 519
sciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond repute
Send a message via AIM to sciguy125 Send a message via MSN to sciguy125 Send a message via Yahoo to sciguy125
Re: reading hobby PWM

Lesson #2: Read very carefully.

Quote:
Originally Posted by PIC12F683 datasheet
The user, in the Interrupt Service Routine, clears the interrupt by:
a) Any read or write of GPIO. This will end the
mismatch condition, then
b) Clear the flag bit GPIF.
A mismatch condition will continue to set flag bit GPIF.
Reading GPIO will end the mismatch condition and
allow flag bit GPIF to be cleared.
The key word in that is then. "Any read or write of GPIO. This will end the mismatch condition, then Clear the flag bit GPIF." That does not mean that it will be cleared automatically when you read from GPIO. That means that GPIF needs to be cleared manually.

Now, when my batteries are recharged, I can test my decoding algorithm...
__________________

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GE/S/P a-- e y-- r-- s:++ d+ h! X+++
t++ C+ P+ L++ E W++ w M-- V? PS+ PE+
5- R-- tv+ b+ DI+++ D- G
------END GEEK CODE BLOCK------