Apr 28, 2010 #1 S summerof69.kunal Newbie level 6 Joined Apr 25, 2010 Messages 13 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Location sikkim Activity points 1,457 hi..i want to use 3 adc channels simultaneously in pic16f877A..for one channel it is set_adc_channel(1); delay_ms(1000); x=read_adc(); what would b the ccs coding if i want to use 3 channels simultaneously...plz send me the coding
hi..i want to use 3 adc channels simultaneously in pic16f877A..for one channel it is set_adc_channel(1); delay_ms(1000); x=read_adc(); what would b the ccs coding if i want to use 3 channels simultaneously...plz send me the coding
Apr 28, 2010 #2 cool.man Full Member level 6 Joined May 29, 2008 Messages 323 Helped 42 Reputation 84 Reaction score 29 Trophy points 1,308 Location Earth Activity points 3,307 Write your code like that Code: set_adc_channel(0); delay_ms(10); value1=read_adc(); set_adc_channel(1); delay_ms(10); value2=read_adc(); set_adc_channel(2); delay_ms(10); value3=read_adc();
Write your code like that Code: set_adc_channel(0); delay_ms(10); value1=read_adc(); set_adc_channel(1); delay_ms(10); value2=read_adc(); set_adc_channel(2); delay_ms(10); value3=read_adc();
Apr 28, 2010 #3 betwixt Super Moderator Staff member Joined Jul 4, 2009 Messages 16,264 Helped 5,140 Reputation 10,309 Reaction score 5,127 Trophy points 1,393 Location Aberdyfi, West Wales, UK Activity points 137,646 There is only one ADC in the 16F877A so you can't take simultaneous measurements. I don't use CCS but I would guess the best you could do is rotate channel numbers in the set_adc_channel() instruction. Brian.
There is only one ADC in the 16F877A so you can't take simultaneous measurements. I don't use CCS but I would guess the best you could do is rotate channel numbers in the set_adc_channel() instruction. Brian.
Apr 28, 2010 #4 K karesz Advanced Member level 5 Joined Apr 13, 2008 Messages 2,328 Helped 327 Reputation 654 Reaction score 52 Trophy points 1,328 Location EU Activity points 14,592 Hi, I dont know ccs coding, but you can sample the 3 channels (external) at same time and read it out sequentially into your PIC... K.
Hi, I dont know ccs coding, but you can sample the 3 channels (external) at same time and read it out sequentially into your PIC... K.