Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 3rd July 2009, 10:16 AM   #1
Default Can't output to RC0 or RC2

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?
chris414 is offline  
Old 3rd July 2009, 11:16 AM   #2
Default

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
Attached Files
File Type: asm chris.asm (2.5 KB, 6 views)
Wp100 is offline  
Old 3rd July 2009, 03:02 PM   #3
Default

PORT = Read Input Pin
LAT = Set/Clear Output Pin
TRIS = Set Pin Direction

Last edited by AtomSoft; 3rd July 2009 at 03:02 PM.
AtomSoft is offline  
Reply

Tags
output, rc0, rc2

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
difference b/w normal output and open drain output of the pic puneetnepsam Micro Controllers 3 28th May 2009 07:50 AM
PIC output pin keeps going low Endicron Micro Controllers 12 1st October 2007 09:15 AM
PIC to PIC and output on LCD pouchito Micro Controllers 20 7th June 2007 09:44 AM
barcode scanner's output and keyboard output zhi_yi General Electronics Chat 3 21st November 2006 05:46 AM
I/O output Manie Micro Controllers 6 14th June 2006 02:49 PM



All times are GMT. The time now is 07:03 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker