|
|
View previous topic :: View next topic |
Author |
Message |
Delene Mulley Guest
|
pic16c8452 and port a |
Posted: Sun Nov 18, 2001 4:16 am |
|
|
Please can someone help me I'm more than pulling my hair out.
I like just about everyone else, was using the f877 and have changed to the 18c452.
I use porta - a3 to calculate a value. If the line is high I add a value. This works fine on my f877 but i can't get the 452 to recognise the changes on the ports.
My code is
if (bit_tes(porta, 0))
total = total + 1;
I have also tried
if (input(pin_a0))
total = total + 1;
without any joy.
What am I missing???
___________________________
This message was ported from CCS's old forum
Original Post ID: 1191 |
|
|
Eric Belanger Guest
|
Re: pic16c8452 and port a |
Posted: Sun Nov 18, 2001 12:13 pm |
|
|
Hi,
I'm not sure if this may help, but did you disable the A/D converter? If not the default uses is analog input and not Digital IO.
// A/D Disable, PORT A I/Os Numeriques seulement
SETUP_ADC( ADC_OFF );
SETUP_ADC_PORTS( NO_ANALOGS );
Eric
:=Please can someone help me I'm more than pulling my hair out.
:=I like just about everyone else, was using the f877 and have changed to the 18c452.
:=I use porta - a3 to calculate a value. If the line is high I add a value. This works fine on my f877 but i can't get the 452 to recognise the changes on the ports.
:=
:=My code is
:=if (bit_tes(porta, 0))
:= total = total + 1;
:=
:=I have also tried
:=if (input(pin_a0))
:= total = total + 1;
:=
:=without any joy.
:=
:=What am I missing???
___________________________
This message was ported from CCS's old forum
Original Post ID: 1200 |
|
|
Delene Mulley Guest
|
Re: pic16c8452 and port a |
Posted: Mon Nov 19, 2001 1:24 am |
|
|
Eric you are a genuis
THANK YOU
:=Hi,
:=
:=I'm not sure if this may help, but did you disable the A/D converter? If not the default uses is analog input and not Digital IO.
:=
:= // A/D Disable, PORT A I/Os Numeriques seulement
:= SETUP_ADC( ADC_OFF );
:= SETUP_ADC_PORTS( NO_ANALOGS );
:=
:= Eric
:=
:=:=Please can someone help me I'm more than pulling my hair out.
:=:=I like just about everyone else, was using the f877 and have changed to the 18c452.
:=:=I use porta - a3 to calculate a value. If the line is high I add a value. This works fine on my f877 but i can't get the 452 to recognise the changes on the ports.
:=:=
:=:=My code is
:=:=if (bit_tes(porta, 0))
:=:= total = total + 1;
:=:=
:=:=I have also tried
:=:=if (input(pin_a0))
:=:= total = total + 1;
:=:=
:=:=without any joy.
:=:=
:=:=What am I missing???
___________________________
This message was ported from CCS's old forum
Original Post ID: 1220 |
|
|
|
|
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
|