Shop OBEX P1 Docs P2 Docs Learn Events
Won't work — Parallax Forums

Won't work

kalvinkalvin Posts: 4
edited 2009-04-24 16:17 in Propeller 1
I'm new to this forum and any help would be appreciated.

I got the prop. about last month, and now i finally found some time to dig it out of the closet. I decided to try a simple circut on a bread board i had using the schmatics from the propeller pdf file. I rigged it up with a led on pin 1, turned it on, and typed a program. Led wouldn't shine. confused.gif· I tried again but this time used an npn transistor, didn't help. I know my program is right (just three lines) and i know the led works and i know i didn't fry my prop because I can download my program. The only thing i can think of is that my batteries·are depelted·(i don't have a regulator, my bread board has a 3v supply line), but when i replaced those same story. Please help!?!!

Comments

  • whickerwhicker Posts: 749
    edited 2009-04-24 15:21
    and what would that 3 line program be?
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2009-04-24 15:24
    Welcome to the forum!
    Did you connect the LED right? Check the program agenst the schematic. Are you using a prop plug or a USB to serial converter or did you build your own serial to prop? Check to make sure that the LED works, and that your batterys are good and you don't have too much current draw.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Toys are microcontroled.
    Robots are microcontroled.
    I am microcontrolled.
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-04-24 15:26
    Yes -- show us your three lines. Also tell us whether you've tried such simple things as turning the diode around to see if it's in backward (something I do far too often).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • kalvinkalvin Posts: 4
    edited 2009-04-24 15:34
    diodes okay, connection is good and all (flat side to ground).

    program is:

    pub main
    dira~~
    outa~
    outa~~

    I tried using different pins, no luck.

    I have a prop plug.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-04-24 15:42
    kalvin,

    Your program is fine, except it's probably finishing before you can see it. Try a "repeat" at the end to keep the cog alive

    '' This code makes ALL 32-I/O's HIGH and an OUTPUT
    CON
      _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
    
    pub main
    dira~~
    outa~    ''<--- This is the default state of the I/O output register and could be omited for this program.
    outa~~
    
    repeat
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 4/24/2009 4:24:32 PM GMT
  • kalvinkalvin Posts: 4
    edited 2009-04-24 15:47
    Eurekka!!! Works (even though its like .1 secs.) light just flashes but i think I can handle it from here. Thank you all!!

    P.S. You might here more noob questions from me latter. [noparse];)[/noparse]

    Thanks again.
  • JonnyMacJonnyMac Posts: 9,194
    edited 2009-04-24 16:17
    Add

    waitcnt(80_000_000 + cnt)

    between the outa~ and outa~~ lines to extend the on-time of the LED.
Sign In or Register to comment.