|
|
View previous topic :: View next topic |
Author |
Message |
kuosda Guest
|
Can't get value from ch1 ,Please help? |
Posted: Wed Feb 12, 2003 8:33 pm |
|
|
//pch V3.142
#include <18F452.h>
#USE DELAY(CLOCK=4000000)
#USE RS232(BAUD=9600, XMIT=PIN_C6, RCV=PIN_C7)
#include <Ad7705.c>
main()
{
long AD_CH0,AD_CH1;
adc_init();
AD_CH0 = read_adc_value(0);
AD_CH1 = read_adc_value(1);
adc_disable();
printf("CH0:\%6.4f CH1:\%6.4f\r\n",
convert_to_volts(AD_CH0),convert_to_volts(AD_CH1));
}
___________________________
This message was ported from CCS's old forum
Original Post ID: 11623 |
|
|
Tomi Guest
|
Re: Can't get value from ch1 ,Please help? |
Posted: Thu Feb 13, 2003 1:35 am |
|
|
Your "read_adc_value()" function doesn't work properly
The problem is the same as in my "Count_butterflies()" function :)
:=//pch V3.142
:=#include <18F452.h>
:=#USE DELAY(CLOCK=4000000)
:=#USE RS232(BAUD=9600, XMIT=PIN_C6, RCV=PIN_C7)
:=#include <Ad7705.c>
:=main()
:={
:= long AD_CH0,AD_CH1;
:= adc_init();
:= AD_CH0 = read_adc_value(0);
:= AD_CH1 = read_adc_value(1);
:= adc_disable();
:= printf("CH0:\%6.4f CH1:\%6.4f\r\n",
:= convert_to_volts(AD_CH0),convert_to_volts(AD_CH1));
:=}
___________________________
This message was ported from CCS's old forum
Original Post ID: 11627 |
|
|
|
|
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
|