Hello folks,
before I tried play with picbasic I worked with PICAXE. I have done few projects with PICAXE 08M2 which is a rebranded PIC12F683 with bootloader.
In PICAXE is one simple cheat which allows to use the pin3 (MCLRE) as output. Pin3 drives an NPN transistor via manipulating weak pullup resistor. In attachment find the schematis which I use wery often. It works fine all the time.
For example here is a simple led blinking code in PICAXE looks like:
Code:#picaxe 08m2 do pullup $08 ;pullup on GPIO.3 LED ON pause 500 disable ;disable pullups LED OFF pause 500 loop
Now the question is how do they made it? I try similar on PIC12F683 in picbasic but no success.
Try to led blinking code in picbasic like:
OK, I now this is not work. I also now the GPIO.3 WPU is activatable only viaCode:;PIC12F683 TRISIO=0 ANSEL=0 OPTION_REG.7=1 ;enable WPU strt: wpu=%00001000 ;enable WPU on GPIO.3 pause 500 wpu=%00000000 ;disable WPU on GPIO.3 pause 500 goto strt end
MCLRE, the GP3 pull-up is enabled when MCLRE is set to"1" in the configuration word register, and disabled when MCLRE is set to"0".
How It works in PICAXE, thats the question. Does anyone have an idea?
Louis
Bookmarks