Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 10th January 2004, 09:41 PM   (permalink)
Default how do I output on GPIO (12F675)?

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.
k7michal is offline  
Old 10th January 2004, 10:36 PM   (permalink)
Default

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
k7michal is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 04:22 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker