Out of loop and no repeating
Areal Person
Posts: 197
Hi my chip is not running correctly, I got it wired on my breadboard
When I do F7 - everything is OK
The chip will not repeat and/or return/loop correctly
I can execute the example 01 code only one time / all my pins
work ok.
This only flashes pin 16 one time, It willnot execute the toggle(17...) line
pin 17 works if I just hardcode it in pub toggle, but it willnot loop/repeat
Also, is the EEPROM required ? or is it optional for development, I know
its nice and all, but is it required for the propeller to function correctly ?
PUB Main
· Toggle(16, 3_000_000, 10)· 'Toggle P16 ten times, 1/4 s each
· Toggle(17, 3_000_000, 10)· 'Toggle P17 twenty times, 1/6 s each
PUB Toggle(Pin, Delay, Count)
{{Toggle Pin, Count times with Delay clock cycles in between.}}
· dira[noparse][[/noparse]Pin]~~
· repeat Count·············· 'Repeat for Count iterations
··· !outa[noparse][[/noparse]Pin]
··· waitcnt(Delay + cnt)····
Thanks,
Ok, thanks, I changed it to 3_000_000, thats what the example uses.
I made a typo, it was not 0, but your kinda right, when I changed it to 500
both leds flashed, but only one time, not looping this code only flashes each led one time
PUB Main
· repeat
··· Toggle(16, 500, 10)· 'Toggle P16 ten times, 1/4 s each
··· Toggle(17, 500, 10)· 'Toggle P17 ten times, 1/6 s each
PUB Toggle(Pin, Delay, Count)
{{Toggle Pin, Count times with Delay clock cycles in between.}}
· dira[noparse][[/noparse]Pin]~~
· repeat Count·············· 'Repeat for Count iterations
··· !outa[noparse][[/noparse]Pin]
··· waitcnt(Delay + cnt)·
I need it to run forever, and it will not
Post Edited (Areal Person) : 11/10/2006 3:08:18 AM GMT
When I do F7 - everything is OK
The chip will not repeat and/or return/loop correctly
I can execute the example 01 code only one time / all my pins
work ok.
This only flashes pin 16 one time, It willnot execute the toggle(17...) line
pin 17 works if I just hardcode it in pub toggle, but it willnot loop/repeat
Also, is the EEPROM required ? or is it optional for development, I know
its nice and all, but is it required for the propeller to function correctly ?
PUB Main
· Toggle(16, 3_000_000, 10)· 'Toggle P16 ten times, 1/4 s each
· Toggle(17, 3_000_000, 10)· 'Toggle P17 twenty times, 1/6 s each
PUB Toggle(Pin, Delay, Count)
{{Toggle Pin, Count times with Delay clock cycles in between.}}
· dira[noparse][[/noparse]Pin]~~
· repeat Count·············· 'Repeat for Count iterations
··· !outa[noparse][[/noparse]Pin]
··· waitcnt(Delay + cnt)····
Thanks,
Ok, thanks, I changed it to 3_000_000, thats what the example uses.
I made a typo, it was not 0, but your kinda right, when I changed it to 500
both leds flashed, but only one time, not looping this code only flashes each led one time
PUB Main
· repeat
··· Toggle(16, 500, 10)· 'Toggle P16 ten times, 1/4 s each
··· Toggle(17, 500, 10)· 'Toggle P17 ten times, 1/6 s each
PUB Toggle(Pin, Delay, Count)
{{Toggle Pin, Count times with Delay clock cycles in between.}}
· dira[noparse][[/noparse]Pin]~~
· repeat Count·············· 'Repeat for Count iterations
··· !outa[noparse][[/noparse]Pin]
··· waitcnt(Delay + cnt)·
I need it to run forever, and it will not
Post Edited (Areal Person) : 11/10/2006 3:08:18 AM GMT
Comments
BTW, you don't need an EEPROM, or even a crystal for development, just the chip and a means to load it. Connecting BOEn to VSS will make life easier, too.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
It's still not looping and flashing forever
Post Edited (Areal Person) : 11/10/2006 3:25:48 AM GMT
Use ctrl-I and see if your indentation is correct.
A WaitCnt of 500 is only 6.25 microseconds. You wouldn't see any flashing. just probably a dim LED.
Post Edited (SailerMan) : 11/10/2006 3:32:48 AM GMT
PUB Main
· repeat
··· Toggle(16, 1_000_000, 10)· 'Toggle P16 ten times, 1/4 s each
··· Toggle(17, 1_000_000, 10)· 'Toggle P17 ten times, 1/6 s each
PUB Toggle(Pin, Delay, Count)
{{Toggle Pin, Count times with Delay clock cycles in between.}}
· dira[noparse][[/noparse]Pin]~~
· repeat Count·············· 'Repeat for Count iterations
··· !outa[noparse][[/noparse]Pin]
··· waitcnt(Delay + cnt)·
Could you be having a power-supply issue? It helps to have a 1uF cap tied across VSS and VDD right near the chip. Also, you need to be able to supply sustained current of probably 5ma to VDD, assuming your using ~300 ohm resistors on your LEDs. I don't know what else the problem could be.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
OK, dumb newbie mistake, my input voltage dropped to 3.0- volts, but
I don't know why it was still showing a good 3.3 over vdd, probly the caps charging
and current was not stable. BINGO - I ramped up.
Thanks, I'm on my way now, cool !