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.

pic16f628: can't use MCLR pin for I/0!

Status
Not open for further replies.

ramantas

New Member
I disable MCLR by configuration bits,
__CONFIG _INTRC_OSC_NOCLKOUT & _MCLRE_OFF

then type

movlw 0x07
movwf CMCON
bcf STATUS, RP1
bsf STATUS, RP0
MOVLW 0xff
MOVWF TRISA

but TRISA register is not affected on bit 5, and i can not use PORTA bit 5 for input. Why? Microchip datasheet says that bit 5 supports input, if you disable MCLR. Currently i am working on Mplab IDE 6.30 - the chip has the same problem, or is it a software bug? (i noticed that checking the model pic16f628A does not correct the problem)
 
thanks for the reply, but your hint doesn't seem to solve the problem. Anyways, I am planning to connect a 4*4 keypad matrix and an LCD screen to the PIC, so the number of I/O pins is a bit of an issue. Is there anything else I could try to disable MCLR?
 
Did you already try it for real? or just simulation.
I burnt a 16F628A here to try and read a switch on MCLR and it works...
Maybe a simulator bug
 
Well, you' ve been a great help Exo! No, i hanen't tried this for real yet (no programmer available at this time). I guess I' ll try it again on the MPLAB 6.32 interim release
 
By making it 14V pic will go to programmer mode - regardless of how the pin is configured
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top