Author |
Message |
Topic: ADC problem |
Tak
Replies: 4
Views: 6589
|
Forum: General CCS C Discussion Posted: Fri Dec 07, 2012 6:40 pm Subject: ADC problem |
That's right. I used 5V source from FT232RL. Normally it's good but when mrf24j40MB module transmits, a large current sinks. ADC got after 10 or maybe 15ms will be unstable 'cause RF will restransmit ... |
Topic: ADC problem |
Tak
Replies: 4
Views: 6589
|
Forum: General CCS C Discussion Posted: Fri Dec 07, 2012 3:13 am Subject: ADC problem |
problem's inside timer isr. When Fifo_lock = 1, the read_adc() got a little higher value (191 and normal it's 185). before that i disable and re-enable timer interrupt.
//////////////////////////// ... |
Topic: ADC problem |
Tak
Replies: 4
Views: 6589
|
Forum: General CCS C Discussion Posted: Fri Dec 07, 2012 2:37 am Subject: ADC problem |
I wrote a code to get ADC every 4ms. I use 18f887 with 20MHz crystal. Everything works fine till i try to get some more samples while waiting for RF module. The buffer takes 2 or 3 more, problem is wh ... |
Topic: How to transmit and receive adc data using zigbee? |
Tak
Replies: 10
Views: 14088
|
Forum: General CCS C Discussion Posted: Thu Apr 26, 2012 6:14 am Subject: How to transmit and receive adc data using zigbee? |
From your code, i think you try to use A0 for ADC. Set up ADC with this:
setup_adc_ports(AN0);//or setup_adc_ports(ALL_ANALOG)
set_adc_channel(0);
setup_adc(ADC_CLOCK ... |
Topic: 16f887 timer problem |
Tak
Replies: 2
Views: 4998
|
Forum: General CCS C Discussion Posted: Mon Apr 23, 2012 10:42 pm Subject: 16f887 timer problem |
Thanks PCM. It did work. my silly
setup_timer_1(T1_INTERNAL|T1_DIV_BY_8); |
Topic: 16f887 timer problem |
Tak
Replies: 2
Views: 4998
|
Forum: General CCS C Discussion Posted: Sun Apr 22, 2012 10:36 pm Subject: 16f887 timer problem |
#include "16f887.h"
#device adc=8
#device *=16
#include "ham.h" // contain ADC set up.
#include <stdio.h>
#FUSES HS, NOWDT
#use delay(clock=8000000)
#use rs2 ... |
|