The batteries are out in my crystal ball Erik. It would help if you could tell us what PIC you're using and post your super new and shiny blinky LED code... I need a laugh this morning....
The batteries are out in my crystal ball Erik. It would help if you could tell us what PIC you're using and post your super new and shiny blinky LED code... I need a laugh this morning....
Well, I'm using a 12F675 and heres one of several that haven't worked:
CMCON = 7 ' Comparators OFF
ANSEL = 0 ' A/D OFF
loop: High GPIO.1 ' Turn on LED connected to PORTB.0
Pause 500 ' Delay for .5 seconds
Low GPIO.1 ' Turn off LED connected to PORTB.0
Pause 500 ' Delay for .5 seconds
Goto loop ' Go back to loop and blink LED forever
End
PS: I forgot to change the comments regarding the port numbers. But I'm wondering about stuff like at the moment I'm running both PBC and PBP on the same computer and it doesn't seem to be a problem but maybe it is. I mean I'm obviously missing something at a basic level here, because all my PBCing was going just fine. Anyway, its getting late on this side of the panet and I'm burnt out from surfing so I'm going to bed. Catch you later, and thanks for any help/suggestions that might help get my LED's blinking again.
Well, since you got a grown-up compiler, we might as well do things properly...
Compile using the command line...Code:' ' PIC Defines ' ----------- @ DEVICE pic12F675, INTRC_OSC_NOCLKOUT ' System Clock Options (Internal) @ DEVICE pic12F675, WDT_ON ' Watchdog Timer @ DEVICE pic12F675, PWRT_ON ' Power-On Timer @ DEVICE pic12F675, MCLR_OFF ' Master Clear Options (Internal) @ DEVICE pic12F675, BOD_ON ' Brown-Out Detect @ DEVICE pic12F675, CPD_OFF ' Data Memory Code Protect @ DEVICE pic12F675, PROTECT_OFF ' Program Code Protection ' ' Hardware Defines ' ---------------- LED var GPIO.1 ' ' Initialise PIC ' -------------- TRISIO=%00001000 ' All Output except GPIO.3 CMCON=%00000111 ' Disable Comparators ANSEL=%00000000 ' Disable ADC ' ' Let's do Blinky Thing... ' ------------------------ Start: Toggle LED Goto Start end
PBP -p12F675 myprog -v
Then if you want to be exotic with your 12F675 download yankeedoodle from here...
http://www.picbasic.co.uk/forum/showthread.php?t=64
Thanks for your help, It looks like I was neglecting the defines (I was setting the fuses with my programmer, but they were obviously getting over-written). It looks like the reason all my stuff was running on PBC was that the INC file didn't turn MCLR on where as my new grown up compiler uses an INC file which turns it on (hmmmm). Anyway, now I am ready to seriously blink some LED'salso thanks for the sound tables that was going to be my next question.
Bookmarks