CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

RA4-PIC16F628

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
WernerKern
Guest







RA4-PIC16F628
PostPosted: Fri Oct 25, 2002 2:13 am     Reply with quote

Hi All,
i`ve made a ittle program with RA4 and RA2 with PIC16F628.( RA4 open drain...I know). I programmed with output_low(Pin_a4) and output_high(pin_a4). When I set a Output_low(pin_a2) between these two output-a4-orders, pin a4 turns low without setting any order with A4. Does the wtiting to the tris register causes this problem??
When I turn pin A4 high with programming it as an Input dummy=input(pin_A4) all is ok.
Sorry for my broken english...

Thank you in advance
Werner
___________________________
This message was ported from CCS's old forum
Original Post ID: 8176
R.J.Hamlett
Guest







Re: RA4-PIC16F628
PostPosted: Fri Oct 25, 2002 2:27 am     Reply with quote

:=Hi All,
:=i`ve made a ittle program with RA4 and RA2 with PIC16F628.( RA4 open drain...I know). I programmed with output_low(Pin_a4) and output_high(pin_a4). When I set a Output_low(pin_a2) between these two output-a4-orders, pin a4 turns low without setting any order with A4. Does the wtiting to the tris register causes this problem??
:=When I turn pin A4 high with programming it as an Input dummy=input(pin_A4) all is ok.
:=Sorry for my broken english...
:=
:=Thank you in advance
:=Werner
What is pulling RA4 up?.
Any 'bit set' operation, involves a 'read, modify, write' cycle. If RA4, is not adequately 'pulled up' (given it is an open collector drive), when read, for the 'output_low(pin_a2)' command, the pin is seen as a low, and this 'low' status, is then output.
The same will also happen with any other pin on the port (or other ports), but for these, the pin has to be driven to the 'wrong' state.

Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 8177
WernerKern
Guest







Re: RA4-PIC16F628
PostPosted: Fri Oct 25, 2002 6:06 am     Reply with quote

Hi R.J.Hamlett,

thats my fault!! I`ve pulled up RA4 with 470 Ohm at 5V, but I`ve a testboard and there is a LED from portpin RA4 to ground. Portpin RA4 sees the 0,7V of the LED and says: low !!`
If I built in the diode in series with the resistor the programm also works!
Thanks !
Werner
___________________________
This message was ported from CCS's old forum
Original Post ID: 8184
WernerKern
Guest







Re: RA4-PIC16F628
PostPosted: Fri Oct 25, 2002 6:07 am     Reply with quote

Hi R.J.Hamlett,

thats my fault!! I`ve pulled up RA4 with 470 Ohm at 5V, but I`ve a testboard and there is a LED from portpin RA4 to ground. Portpin RA4 sees the 0,7V of the LED and says: low !!`
If I built in the diode in series with the resistor the programm also works!
Thanks !
Werner
___________________________
This message was ported from CCS's old forum
Original Post ID: 8186
R.J.Hamlett
Guest







Re: RA4-PIC16F628
PostPosted: Fri Oct 25, 2002 9:23 am     Reply with quote

:=Hi R.J.Hamlett,
:=
:=thats my fault!! I`ve pulled up RA4 with 470 Ohm at 5V, but I`ve a testboard and there is a LED from portpin RA4 to ground. Portpin RA4 sees the 0,7V of the LED and says: low !!`
:=If I built in the diode in series with the resistor the programm also works!
:=Thanks !
:=Werner
Good news. :-)
___________________________
This message was ported from CCS's old forum
Original Post ID: 8193
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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