Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

18f4550 RC0

Status
Not open for further replies.

HerbertMunch

New Member
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:D
 
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 said:
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.:eek:
 

Attachments

  • ahah.png
    ahah.png
    3.2 KB · Views: 145
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top