Created Sat, 11 Mar 2017 05:57:04 +0000 by riceman0
Sat, 11 Mar 2017 05:57:04 +0000
Hello, I'm using a chipkit uC32 -- I'm using MPLABX and a debugger and just writing C to it. I think I see on the schematic that LEDs 4 and 5 are driven by GPIO outputs RG6 and RF0. So I try this code to light the LEDs,
LATGbits.LATG6 = 1; LATFbits.LATF0 = 1;
and... nothing. Is there something else I must do in hardware (jumpers or something) to light these LEDs? Or is it more likely I've gotten my code wrong?
Sat, 11 Mar 2017 06:05:39 +0000
One of the things about Microchip ports is that there are a couple things that have to be done before an LED will turn on.
TRISGbits.TRISG6 = 0; TRISFbits.TRISF0 = 0;
These statements change the tristate register on the port so that they go from being inputs to being outputs.
Sat, 11 Mar 2017 11:57:20 +0000
[slaps head] Thank you!