![]() | ![]() | ![]() |
| | |||||||
| 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) |
| Hi. I've been programming PICs quite a lot but when I tried the 12F675 the old methods of adressing the ports just don't work the same as in the 16F84. I tried this: bsf status,rp0 clrf trisio bcf status,rp0 movlw 0xff movwf gpio <<<----- this one should work right? bsf gpio,1 <<<----- this as well right? yet non of them work. so far I've tested it on MPLABSIM, and I've actually burned it into a chip and it seemed that the GPIOs were not doing anything.. I've also had no results with HI-TECH Clite Please Help. | |
| |
| | (permalink) |
| Never mind. I've figured it out. But here is the answer for those interested anyway. this is the initializing GPIO command: bcf status,rp0 clrf gpio movlw 0x07 movwf CMCON <<<--- by default this register turnes the i/o to comparator bsf status,rp0 clrf ANSEL <<<--- (default) turns gpios to analog inputs | |
| |