PICAX28X1 C port

SGraham

New Member
This is my firt PICAX project, thow I have used pics before. I am using a PICAX28X1. I need to use pin 17 and 18 as outputs. When I use the following code
Code:
let dirsc = %11111111
let pinsc = %11111111
When I run the simulater it shows only the first 3 output pins going high. These are pins 12,13 and 14. Why am I not getting high outputs on pins 15,16,17 and 18?
Is there other comands for seting this C port?

SGteck
 

andrew_qld

Senior Member
You may have to use let "dirsc = %11111111" to set the port C pins as outputs, although I don't think I have ever had to do that- as soon as you change the state of a pin it configures it as an output.

To switch on and off individual port-c pins you can use "low portc 2" or "high portc 3" etc.

I hope this helps.

Andrew
 

Technical

Technical Support
Staff member
Your original code is ok and works correctly in the simulator we are using (5.1.7) - all 8 portc outputs go high.
 

SGraham

New Member
Thank you for the information you supplyed. The problem was due to some fault with the early version of the editor I was using. I had some trouble with WinRAR for upgrading but it all works O.K. now.
Thanks.
 
Top