![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #1 |
|
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) | |
| |
| | #2 |
|
Seems like your config word isn't assembled right Try __CONFIG 0x3D18 | |
| |
| | #3 |
|
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?
| |
| |
| | #4 |
|
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 | |
| |
| | #5 |
|
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
| |
| |
| | #6 |
|
How do you reprogram after MCLR is set to input?
| |
| |
| | #7 |
|
By making it 14V pic will go to programmer mode - regardless of how the pin is configured
| |
| |
| | #8 |
|
I program using LVP. I guess that is out if you are operating in that mode. | |
| |
|
| Thread Tools | |
| Display Modes | |
| |