Author |
Message |
Topic: How to detect both edges in EXT interrupt |
hydrogene
Replies: 10
Views: 31217
|
Forum: General CCS C Discussion Posted: Sat Jun 12, 2004 3:47 pm Subject: How to detect both edges in EXT interrupt |
Hi,
You can do your own edge detector. Here is the code:
//Global var
int1 btn_state = 0;
#int_ext
void interrupt_B_zero();
{
btn_state = ~btn_state; // change 1 f ... |
Topic: int_rda problem with 3.202 version?? |
hydrogene
Replies: 1
Views: 8762
|
Forum: General CCS C Discussion Posted: Thu Jun 10, 2004 5:48 am Subject: int_rda problem with 3.202 version?? |
Hi,
I want help, because on the demo version (3.17), it was working well, but now, it's not working (3.202)
The interrupt on RX pin (RC7) seems not work. Also, I saw an other problem, the ed ... |
Topic: ADC *** Locked. 2004 thread. |
hydrogene
Replies: 25
Views: 87644
|
Forum: General CCS C Discussion Posted: Tue May 25, 2004 9:30 am Subject: ADC *** Locked. 2004 thread. |
I don't know what you mean by float type.
read_adc return a 10 bits integer. with this, you must do this :
Float = value * 5 / 1024;
It's only what I understand... if it's not that, you ca ... |
Topic: ADC *** Locked. 2004 thread. |
hydrogene
Replies: 25
Views: 87644
|
Forum: General CCS C Discussion Posted: Tue May 25, 2004 8:55 am Subject: ADC *** Locked. 2004 thread. |
Hi,
I already saw this problem last month. I only forgot to put : setup_adc_ports(ALL_ANALOG).
Here my lines :
setup_port_a(ALL_ANALOG);
setup_adc_ports(ALL_ANALOG);
setup_adc(ADC_CLOCK_I ... |
Topic: interrupt problem after migration 16f877 to 18f452 |
hydrogene
Replies: 15
Views: 37994
|
Forum: General CCS C Discussion Posted: Tue May 25, 2004 8:06 am Subject: interrupt problem after migration 16f877 to 18f452 |
Hi every body,
I read the datasheet of pic16f877 2 months ago. 2 days ago, I read the 18F452. I don't understand my problem, so when I changed the Timer1 by Timer2, my code works well!!!!!!! ... |
Topic: interrupt problem after migration 16f877 to 18f452 |
hydrogene
Replies: 15
Views: 37994
|
Forum: General CCS C Discussion Posted: Sun May 23, 2004 4:29 pm Subject: interrupt problem after migration 16f877 to 18f452 |
Hello !!!
My button is on pin B0 (int0). So I can not put the TrisB at 00, at lease 01.
For the Timer1, I put // (comment) it and it's not working to...
I'm so disappointed :(
Tan ... |
Topic: interrupt problem after migration 16f877 to 18f452 |
hydrogene
Replies: 15
Views: 37994
|
Forum: General CCS C Discussion Posted: Sun May 23, 2004 12:32 pm Subject: interrupt problem after migration 16f877 to 18f452 |
it's good to know
But...
It's not working on my real code... (it was only a test the old one) (I cut some innutil parts )
Code :
#include <18F452.h>
#DEVICE ADC=10 *=16
#inclu ... |
Topic: interrupt problem after migration 16f877 to 18f452 |
hydrogene
Replies: 15
Views: 37994
|
Forum: General CCS C Discussion Posted: Sun May 23, 2004 12:01 pm Subject: interrupt problem after migration 16f877 to 18f452 |
WOW, it's working!!!!!!
thanx a lot ,
so why I must put all interrupts enabled ??? |
Topic: interrupt problem after migration 16f877 to 18f452 |
hydrogene
Replies: 15
Views: 37994
|
Forum: General CCS C Discussion Posted: Sun May 23, 2004 11:42 am Subject: interrupt problem after migration 16f877 to 18f452 |
it's not working :'(
The code is stupid... why it's not simply work???? |
Topic: interrupt problem after migration 16f877 to 18f452 |
hydrogene
Replies: 15
Views: 37994
|
Forum: General CCS C Discussion Posted: Sun May 23, 2004 11:32 am Subject: interrupt problem after migration 16f877 to 18f452 |
I saw that on the forum, so I dont know!!! |
Topic: interrupt problem after migration 16f877 to 18f452 |
hydrogene
Replies: 15
Views: 37994
|
Forum: General CCS C Discussion Posted: Sun May 23, 2004 11:24 am Subject: interrupt problem after migration 16f877 to 18f452 |
Hi!
before to read a lot on this forum, I decide to do the migration and I changed the 16f877 for a 18f452. So when I put the code inside, the interrupt on RB0 doesn't work. (my code was work ... |
|