Keep reading and trying. The LEDs will blink. But I would put the card reader on the back shelf for awhile.
Keep reading and trying. The LEDs will blink. But I would put the card reader on the back shelf for awhile.
Dave
Always wear safety glasses while programming.
Thanks for being patience,at the end I did it!But with this code one led stay on,and wit other code I will post one led is blinking.whats next?
Code:'**************************************************************** '* Name : P16F690.INC * '* Author : [select VIEW...EDITOR OPTIONS] * '* Notice : Copyright (c) 2009 [select VIEW...EDITOR OPTIONS] * '* : All Rights Reserved * '* Date : 24/08/2009 * '* Version : 1.0 * '* Notes : * '* : * '**************************************************************** '16F690 DEMO ' DEFINE OSC 8 'Comment the 4Mhz and uncomment these for 8Mhz OSCCON=%01110000 DEFINE OSC 4 'This is the default setting OSCCON=%01100000 @ device pic16F690, intrc_osc_noclkout, wdt_on, mclr_on, protect_off TRISC = %00000000 '0 will make the pins an output, 1 will make them inputs START: PORTC = %00000001 PAUSE 250 PORTC = %00000010 GOTO START
Last edited by osceola; - 24th August 2009 at 23:09.
With this code one led is blinking.By the way,I had no succes compiling with MPASM,I use PM for both.
I have now a breadboard,rezistors,leds and PIC16F628.Can we go on with it?Code:'**************************************************************** '* Name : P16F690.INC * '* Author : [select VIEW...EDITOR OPTIONS] * '* Notice : Copyright (c) 2009 [select VIEW...EDITOR OPTIONS] * '* : All Rights Reserved * '* Date : 24/08/2009 * '* Version : 1.0 * '* Notes : * '* : * '**************************************************************** '16F690 DEMO DEFINE OSC 8 'Comment the 4Mhz and uncomment these for 8Mhz OSCCON=%01110000 DEFINE OSC 4 'This is the default setting OSCCON=%01100000 @ device pic16F690, intrc_osc_noclkout, wdt_on, mclr_on, protect_off 'VARS LED1 VAR PORTC.0 LED2 VAR PORTC.1 START: HIGH LED1 LOW LED2 PAUSE 250 LOW LED1 HIGH LED2 PAUSE 250 GOTO START
THANK YOU!!!
Do you have MPASM installed? Does not really matter for this stuff but you will need it later.
Why only one LED? You should have two. And you were to work on a button part of the code to change the way the LEDs blink.
Dave
Always wear safety glasses while programming.
Yes,I have it installed,I think,is the one with comes on cd with PICKIT 2? Is named MPASMWIN?If is this,yes,I have it installed.
Sorry but didnt get this:And you were to work on a button part of the code to change the way the LEDs blink.
To work where?Do I have to change something?
Ok,I did it now,I ansemble the two codes toghether and now are blinking both Leds.
With this code is blinking LED 1 and 2Code:'**************************************************************** '* Name : P16F690.INC * '* Author : [select VIEW...EDITOR OPTIONS] * '* Notice : Copyright (c) 2009 [select VIEW...EDITOR OPTIONS] * '* : All Rights Reserved * '* Date : 25/08/2009 * '* Version : 1.0 * '* Notes : * '* : * '**************************************************************** '16F690 DEMO ' DEFINE OSC 8 'Comment the 4Mhz and uncomment these for 8Mhz OSCCON=%01110000 DEFINE OSC 4 'This is the default setting OSCCON=%01100000 @ device pic16F690, intrc_osc_noclkout, wdt_on, mclr_on, protect_off TRISC = %00000000 '0 will make the pins an output, 1 will make them inputs 'VARS LED1 VAR PORTC.0 LED2 VAR PORTC.1 START: HIGH LED1 LOW LED2 PAUSE 250 LOW LED1 HIGH LED2 PAUSE 250 PORTC = %00000001 PAUSE 250 PORTC = %00000010 GOTO START
Last edited by osceola; - 25th August 2009 at 00:29.
With this code is blinking LED no.1 and 4.
Code:'16F690 DEMO ' DEFINE OSC 8 'Comment the 4Mhz and uncomment these for 8Mhz OSCCON=%01110000 DEFINE OSC 4 'This is the default setting OSCCON=%01100000 @ device pic16F690, intrc_osc_noclkout, wdt_on, mclr_on, protect_off TRISC = %00000000 '0 will make the pins an output, 1 will make them inputs 'VARS LED1 VAR PORTC.2 LED2 VAR PORTC.3 START: HIGH LED1 LOW LED2 PAUSE 250 LOW LED1 HIGH LED2 PAUSE 250 PORTC = %00000001 PAUSE 250 PORTC = %00000010 GOTO START
Dave
Always wear safety glasses while programming.
Witch manual?And isnt the way I did it before right?
Last edited by osceola; - 25th August 2009 at 12:27.
Bookmarks