Can't output to RC0 or RC2

Status
Not open for further replies.

chris414

New Member
I'm using a PIC18F2550 and struggling to output to RC0 and RC2 (I can output to RC1 fine). My registers are as follows:

PORTC: 11000111
T1CON: 00000000
TRISC: 00000000
LATC: 11000111
T3CON: 00000000

Sorry I don't know if all of that is relevant, but anyway. Why won't the RC0 and RC2 outputs turn on?
 
Hi,

If you are running using the code I sent the other day it may be an error I made
In the config Line I left it with DEBUG=ON, it should be OFF.

Attached is the code I have just had flashing a led on PORTC,0.


Also, do not use both the PORT and LAT commands - LAT, according to Microchip should be used in preferance to the PORT instruction - although 99% of coders still use PORT
 

Attachments

  • chris.asm
    2.5 KB · Views: 123
PORT = Read Input Pin
LAT = Set/Clear Output Pin
TRIS = Set Pin Direction
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…