Hi I'm a newbie trying to program the PIC12F675 using Hi-Techs PICLite C software. I'm having trouble setting the outputs when addressing them directly. If I do the following "GPIO = 0b00000110" It will turn on two outputs But, If I do GPIO1 = 1 GPIO2 = 1 One of the ouputs will be high (4.8v) the other will very low (0.3v). Is there something I'm dping wrong? Thanks |
|

12F675 GPIO
Started by ●December 26, 2003
Reply by ●December 26, 20032003-12-26
Have you set TRISIO register. A zero is an
output.
Ian
|
|
Reply by ●December 26, 20032003-12-26
Hi I've set TRISIO = 0 , which makes everything bar the default input pin (GPIO3) an output. But I still can't get more than one output high by adressing each bit independantly. --- In , "I Forse" <i.forse@t...> wrote: > Have you set TRISIO register. A zero is an output. > > Ian > -----Original Message----- > From: noodles123x [mailto:noodles123x@y...] > Sent: 26 December 2003 13:42 > To: > Subject: [piclist] 12F675 GPIO > Hi > > I'm a newbie trying to program the PIC12F675 using Hi-Techs PICLite C > software. > > I'm having trouble setting the outputs when addressing them > directly. If I do the following > > "GPIO = 0b00000110" It will turn on two outputs > > But, If I do > > GPIO1 = 1 > GPIO2 = 1 > > One of the ouputs will be high (4.8v) the other will very low (0.3v). > Is there something I'm dping wrong? > > Thanks > > to unsubscribe, go to http://www.yahoogroups.com and follow the > instructions > > -------------------------------- -------- > -- > Yahoo! Groups Links > > a.. To > -- > Outgoing mail is certified Virus Free. > Checked by AVG Anti-Virus (http://www.grisoft.com). > Version: 7.0.209 / Virus Database: 261.5.3 - Release Date: 23/12/03 |
|
Reply by ●December 26, 20032003-12-26
--- In , "noodles123x" <noodles123x@y...> wrote: > Hi > > I've set TRISIO = 0 , which makes everything bar the default input > pin (GPIO3) an output. But I still can't get more than one output > high by adressing each bit independantly. > Don't forget that the 12F675 has an ADC built in and like all PICs with built in analog functions the default mode of operation is that the analog device is enabled. Read the manual/datasheet and find out how to switch the pins to digital I/O instead of analog. Mike > --- In , "I Forse" <i.forse@t...> wrote: > > Have you set TRISIO register. A zero is an output. > > > > Ian > > -----Original Message----- > > From: noodles123x [mailto:noodles123x@y...] > > Sent: 26 December 2003 13:42 > > To: > > Subject: [piclist] 12F675 GPIO > > > > > > Hi > > > > I'm a newbie trying to program the PIC12F675 using Hi-Techs > PICLite C > > software. > > > > I'm having trouble setting the outputs when addressing them > > directly. If I do the following > > > > "GPIO = 0b00000110" It will turn on two outputs > > > > But, If I do > > > > GPIO1 = 1 > > GPIO2 = 1 > > > > One of the ouputs will be high (4.8v) the other will very low > (0.3v). > > Is there something I'm dping wrong? > > > > Thanks > > > > > > > > > > > > > > to unsubscribe, go to http://www.yahoogroups.com and follow the > > instructions > > > > > > > > ----------------------------- --- > -------- > > -- > > Yahoo! Groups Links > > > > a.. To > > > > > > -- > > Outgoing mail is certified Virus Free. > > Checked by AVG Anti-Virus (http://www.grisoft.com). > > Version: 7.0.209 / Virus Database: 261.5.3 - Release Date: 23/12/03 |
Reply by ●December 27, 20032003-12-27
Try ANSEL = 0
Selects analogue/digital, see datasheet
Also set comparator off with CMCON = 0b00000111 or you may get your
output putting out a short 0 pulse when set to 1.
Ian
|
Reply by ●December 28, 20032003-12-28
A limitation of the 12F675, is that you can not make the GPIO 3 an output. Sven > Try ANSEL = 0 > Selects analogue/digital, see datasheet > > Also set comparator off with CMCON = 0b00000111 or you may get your output > putting out a short 0 pulse when set to 1. > > Ian > -----Original Message----- > From: noodles123x [mailto:] > Sent: 26 December 2003 23:09 > To: > Subject: [piclist] Re: 12F675 GPIO > Hi > > I've set TRISIO = 0 , which makes everything bar the default input > pin (GPIO3) an output. But I still can't get more than one output > high by adressing each bit independantly. > > --- In , "I Forse" <i.forse@t...> wrote: > > Have you set TRISIO register. A zero is an output. > > > > Ian > > -----Original Message----- > > From: noodles123x [mailto:noodles123x@y...] > > Sent: 26 December 2003 13:42 > > To: > > Subject: [piclist] 12F675 GPIO > > > > > > Hi > > > > I'm a newbie trying to program the PIC12F675 using Hi-Techs > PICLite C > > software. > > > > I'm having trouble setting the outputs when addressing them > > directly. If I do the following > > > > "GPIO = 0b00000110" It will turn on two outputs > > > > But, If I do > > > > GPIO1 = 1 > > GPIO2 = 1 > > > > One of the ouputs will be high (4.8v) the other will very low > (0.3v). > > Is there something I'm dping wrong? > > > > Thanks > > > > > > > > > > > > > > to unsubscribe, go to http://www.yahoogroups.com and follow the > > instructions > > > > > > > > ------------------------------ -- > -------- > > -- > > Yahoo! Groups Links > > > > a.. To > > > > > > -- > > Outgoing mail is certified Virus Free. > > Checked by AVG Anti-Virus (http://www.grisoft.com). > > Version: 7.0.209 / Virus Database: 261.5.3 - Release Date: 23/12/03 > to unsubscribe, go to http://www.yahoogroups.com and follow the > instructions > ---------------------------------- ------ > -- > Yahoo! Groups Links > > a.. To > -- > Outgoing mail is certified Virus Free. > Checked by AVG Anti-Virus (http://www.grisoft.com). > Version: 7.0.209 / Virus Database: 261.5.3 - Release Date: 23/12/03 > Milton Medicinteknik KB Backgdsgatan 15 S-590 49 Vikingstad SWEDEN Ph. +46 13 83 202 Fax +46 13 83 204 Mobile: +46 70 679 0489 www.medicinteknik.net |
|
Reply by ●December 28, 20032003-12-28
Hi Thanks for the reply's, i tried all of the suggested but to no avail. ive no switched to the 12F629 and it seems ok. So it must have been something to do with the ADC etc Thanks --- In , "Milton Medicinteknik KB" <milton.medicinteknik@t...> wrote: > A limitation of the 12F675, is that you can not make the GPIO 3 an > output. > Sven > > > Try ANSEL = 0 > > Selects analogue/digital, see datasheet > > > > Also set comparator off with CMCON = 0b00000111 or you may get your > output > > putting out a short 0 pulse when set to 1. > > > > Ian > > -----Original Message----- > > From: noodles123x [mailto:noodles123x@y...] > > Sent: 26 December 2003 23:09 > > To: > > Subject: [piclist] Re: 12F675 GPIO > > > > > > Hi > > > > I've set TRISIO = 0 , which makes everything bar the default input > > pin (GPIO3) an output. But I still can't get more than one output > > high by adressing each bit independantly. > > > > --- In , "I Forse" <i.forse@t...> wrote: > > > Have you set TRISIO register. A zero is an output. > > > > > > Ian > > > -----Original Message----- > > > From: noodles123x [mailto:noodles123x@y...] > > > Sent: 26 December 2003 13:42 > > > To: > > > Subject: [piclist] 12F675 GPIO > > > > > > > > > Hi > > > > > > I'm a newbie trying to program the PIC12F675 using Hi-Techs > > PICLite C > > > software. > > > > > > I'm having trouble setting the outputs when addressing them > > > directly. If I do the following > > > > > > "GPIO = 0b00000110" It will turn on two outputs > > > > > > But, If I do > > > > > > GPIO1 = 1 > > > GPIO2 = 1 > > > > > > One of the ouputs will be high (4.8v) the other will very low > > (0.3v). > > > Is there something I'm dping wrong? > > > > > > Thanks > > > > > > > > > > > > > > > > > > > > > to unsubscribe, go to http://www.yahoogroups.com and follow the > > > instructions > > > > > > > > > > > > -------------------------- ---- > -- > > -------- > > > -- > > > Yahoo! Groups Links > > > > > > a.. To > > > > > > > > > -- > > > Outgoing mail is certified Virus Free. > > > Checked by AVG Anti-Virus (http://www.grisoft.com). > > > Version: 7.0.209 / Virus Database: 261.5.3 - Release Date: > 23/12/03 > > > > > > > > to unsubscribe, go to http://www.yahoogroups.com and follow the > > instructions > > > > > > > > > > > > > > > > > > ------------------------------ ---- > ------ > > -- > > Yahoo! Groups Links > > > > a.. To > > > > > > -- > > Outgoing mail is certified Virus Free. > > Checked by AVG Anti-Virus (http://www.grisoft.com). > > Version: 7.0.209 / Virus Database: 261.5.3 - Release Date: 23/12/03 > > > Milton Medicinteknik KB > Backgdsgatan 15 > > S-590 49 Vikingstad > SWEDEN > > Ph. +46 13 83 202 > Fax +46 13 83 204 > Mobile: +46 70 679 0489 > > www.medicinteknik.net |
