![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #1 |
|
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? | |
| |
| | #2 |
|
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 | |
| |
| | #3 |
|
PORT = Read Input Pin LAT = Set/Clear Output Pin TRIS = Set Pin Direction
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics Last edited by AtomSoft; 3rd July 2009 at 03:02 PM. | |
| |
|
| 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 |