I'm using the 18LF8720 and the ICD 2 as a debugger with MPLAB ver 7.10. Compiler is PCWH ver 3.206.
Port F pins F1 and F4 are set up as outputs (SET_TRIS_F( 0x2c ). The program sets them both high and this is confirmed by stoping operation and viewing PORTF SFR bits 1 and 4 in a watch window. A Process Reset (hot key F6) is issued in MPLAB. Bit 1 is set to 0 but not bit 4 as viewed in the watch window. Operation is continued by pressing hot key F9. After stopping operation port F is viewed again. Bit 1 and bit 4 are now both high.
I understand they should both be high when operation resumed because nothing sent them low. Why does bit 1 go low with a reset? Why does bit 4 not go low with the reset? Both outputs are pulled down with a 10K resistor.
thanks
Ttelmah Guest
Posted: Thu Jul 28, 2005 2:13 am
Look at the data sheet. By default, the TRIS register is setup to make all pins inputs on a reset. This will be the setting, till you reach your TRIS instruction. Though you say both have pull-down resistors (which should then make them both go to '0'), are these enough to actually pull-down the pins with the circuitry attached?.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum