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