Using 3 Analog Channels on 16F877A

Moderator: Benj

Post Reply
markus747
Posts: 33
Joined: Mon Jul 23, 2012 7:17 pm
Location: Petaluma california USA
Has thanked: 26 times
Been thanked: 2 times
Contact:

Using 3 Analog Channels on 16F877A

Post by markus747 »

When adding component macro, I don't see how to use 3 analog channels, There are only ADC(0) and ADC(1) to choose from?

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times

Re: USING 3 ANALOG CHANNELS ON 16F877A

Post by JohnCrow »

Hi Markus

Im not at home to confim this but the 16F877A has far more than 2 ADC channels, Port A and Port E both have them.
I suspect this is a limitation on the free version as compared with the full versions.
Ive used 4 channels on projects on this device.
1 in 10 people understand binary, the other one doesn't !

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: USING 3 ANALOG CHANNELS ON 16F877A

Post by medelec35 »

ADC(0) and ADC(1) are just like component references VR1 VR2 etc on a PCB. So if you require 3 differnt analogue channels e.g an5, an6 and an7 then you will have 3 analogue components: ADC(0), ADC(1) and ADC(2)
They are not the analogue channels.
So to select 3 different analogue channels you need to add one more ADC component.
adc.png
(128.64 KiB) Downloaded 892 times
Then with each component, just right click and select connections and select desired Analogue channel.

That's of course if I have read question correctly?

Martin
Martin

markus747
Posts: 33
Joined: Mon Jul 23, 2012 7:17 pm
Location: Petaluma california USA
Has thanked: 26 times
Been thanked: 2 times
Contact:

Re: USING 3 ANALOG CHANNELS ON 16F877A

Post by markus747 »

So it looks like it must be added to the panel to define the connections. Is that correct I haven't seen connections anywhere else.
I added another ANALOG to panel then it appeared in list

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: USING 3 ANALOG CHANNELS ON 16F877A

Post by medelec35 »

markus747 wrote:So it looks like it must be added to the panel to define the connections. Is that correct I haven't seen connections anywhere else.
Yep that is correct. If you want anymore An i/ps, then must be added to panel, then channel can be selected.
Martin

Post Reply