Author |
Message |
Topic: Please help me with 16 bit problem |
cybanical
Replies: 17
Views: 16678
|
Forum: General CCS C Discussion Posted: Mon Apr 21, 2008 1:40 pm Subject: cont'd |
In a similar vein....
I'm trying to use a PIC18F4520 (came with the kit) to convert a 2 channel, optical encoder signal into an Analog tachometer to replace the broken tach I have on an old servo m ... |
Topic: Determining square-wave frequency input into pic |
cybanical
Replies: 49
Views: 153855
|
Forum: General CCS C Discussion Posted: Sat Apr 19, 2008 7:10 pm Subject: questions |
PCM Programmer, I have a couple questions about your CCP1 code and frequency calculation:
#int_ccp1
void ccp1_isr(void)
{
int16 current_ccp;
static int16 old_ccp = 0;
// Read ... |
Topic: rotary encoder grey code problem |
cybanical
Replies: 9
Views: 13756
|
Forum: General CCS C Discussion Posted: Wed Apr 16, 2008 12:58 am Subject: rotary encoder grey code problem |
hmm.
So, I'm using Ttelmah's quadrature code that uses a Global interrupt and I'm trying to include a tachometer by using CCP2 interrupt on pinB3 to capture every 4th rising edge. I've read thro ... |
Topic: rotary encoder grey code problem |
cybanical
Replies: 9
Views: 13756
|
Forum: General CCS C Discussion Posted: Tue Apr 15, 2008 7:17 pm Subject: global vs timer interrupt |
However I used it with a minimised 'global' handler, that doesn't save most registers, and like this, it happily handled a servo at up to 5000RPM, on a 128 line encoder.
If one uses a 'global' int ... |
Topic: need help for rotary encoder |
cybanical
Replies: 20
Views: 27014
|
Forum: General CCS C Discussion Posted: Tue Apr 15, 2008 10:00 am Subject: thanks |
Great, thanks for the direction, that makes sense. I found the memory organization charts in the data sheets (table 5.1 for the 18f4520), I had looked before but didn't really know what i was looking ... |
Topic: need help for rotary encoder |
cybanical
Replies: 20
Views: 27014
|
Forum: General CCS C Discussion Posted: Mon Apr 14, 2008 11:09 pm Subject: Further information |
I have put together a demo, which should show how it works:
I'm just getting started with microcontrollers and for one of my first applications I am trying to write a quadrature encoder program t ... |
|