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 19th February 2008, 10:58 AM   #1
Default 18f4550 RC0

Hi all,
anyone know how to configure rc0 as a digital output?

I have tried everything i can think of, but it still wont work!

Code:
	PORTA=0;
	PORTB =0;
	PORTC =0;
	PORTE =0;
	
	T1CON =0;
	ADCON1 = 0x0F;
	CMCON = 0x07;
	
	TRISB = 0;
	TRISA =0;
	TRISE =0;
	TRISC =0;
	
//	RED_LED10(1);	
	LATA = 0xff;
	LATB = 0xff;
	LATC = 0xff;
	LATE = 0xff;
the datasheet states that rc0 is multiplexed with timer1, but ihave turned this off by setting t1con =0; it still doesnt work though.

Any ideas?

many thanks
HerbertMunch is offline  
Old 19th February 2008, 11:11 AM   #2
Default

Port C,0 works fine. I have used it on the Unicorn to drive CS2 of a graphic LCD. Could the pin be shorted to ground? What do you read back from PORTC and LATC?

Mike.
Pommie is online now  
Old 19th February 2008, 11:59 AM   #3
Default

Quote:
Originally Posted by Pommie
Port C,0 works fine. I have used it on the Unicorn to drive CS2 of a graphic LCD. Could the pin be shorted to ground? What do you read back from PORTC and LATC?

Mike.
Hi mike,
Thanks very much, i just checked the board again with a meter and found a short. I had routed the rc0 trace through the tiny gap inbetween an 0805 resistor.
Attached Thumbnails
18f4550 RC0-ahah.png  
HerbertMunch is offline  
Reply

Tags
rc0

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
PIC 18F4550 interacing with USB amax Micro Controllers 7 21st December 2007 03:13 PM



All times are GMT. The time now is 01:39 PM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker