Help on PIC18F2585

Thread Starter

101

Joined Mar 8, 2008
5
Please can anyone help out with PIC18F2585? I'm trying to turn ON and turn OFF LEDs. I've written the code and compiled using MPLAB C18 C compiler and using MPLAB ICD2 debugger to program and debug the microcontroller. It doesn't set the PORTS (PORTB and PORTC) to Output. The when I tested the code on the PICDEM4 demo board where PIC18F1320 is used, it works well. The hardware seems ok and voltage readings on the VDD and /MCLR pin are OK, but very low voltage is read on the ports.

Please find attached the sample code written in C.

Thank you very much.

Best Regards,
101
 

Attachments

n9352527

Joined Oct 14, 2005
1,198
Read through the datasheet and figure out the pins on that ports that are multiplexed (if any) with other functions, such as analogue inputs, comparators, etc. Then try disabling those alternate functions to set the pins as digital I/O.
 
Top