Shop OBEX P1 Docs P2 Docs Learn Events
This is very basic but I am not getting it — Parallax Forums

This is very basic but I am not getting it

I received my QuickStart board and am attempting to make it blink an led but am having no success. The power on light is on. Using the Propellor tool when I load an example using the F10 button (I am using ConstantBlinkRate) the red and Blue Rx TX leds flash. The led which looks like it should be on Pin 4 does not flash however. When I push F7 the program finds the Propellor chip on Com 18. So.....it seems to me that that the Propellor tool is finding the board and uploading to it but the board is not responding for some reason.
I tried the Simple IDE with similar results using the BlinkLight.side program. It compiled and loaded but no results blinking an led.
I have done searches looking for a cause of the led not blinking but I am not finding anything that helps. I am sure that I am missing something very basic and easy but for me it is not easy as I do not know what it is. I am still waiting for my Propellor books to learn but am eager to get this board to respond.

Any ideas for a real amateur with the Propellor board?

Thanks

Will

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    I am assuming you're using the Propeller Tool in your initial attempt, just because you mentioned F10 and F7. But what code are you using to blink the LED?
  • Be sure that the "blink led" code you're running is specific to the QuickStart board. The Prop has 32 general I/O pins, any of which could be used by a random demo to blink an LED.

    Attach the code you're trying and someone here should be able to help.
  • ElectrodudeElectrodude Posts: 1,657
    edited 2016-05-03 18:19
    Try this Spin code:
    PUB main
    
      dira[16] := 1               ' make pin 16 an output
    
      repeat                      ' loop forever
        !outa[16]                 ' toggle pin 16
        waitcnt(clkfreq/4 + cnt)  ' wait 1/4 second
    
    
  • ...and here's the same code in C, for SimpleIDE:
    #include <propeller.h>           // include pin & register definitions for the Prop
    
    int main(void)
    {
      DIRA |= 1<<16;                 // Make pin 16 an output
    
      while( true )                  // repeat forever
      {
        OUTA ^= 1<<16;               // Toggle pin 16
        waitcnt( CNT + 20000000 );   // Assuming freq is 80MHz because I don't remember the exact case of clkfreq in C
      }
    }
    

    Untested, but I'm hoping it's simple enough to just work.
  • Thanks everyone who replied for your all your help. I have the board blinking leds like crazy - with the code given. I feel kind of dumb but it is a truth you cannot blink an led that does not exist. Lol. In retrospect I should not have assumed that the board I that I have had leds attached to the pins the code referred to. I should have looked at the data sheets.

    Chris - You are correct. I should have posted the code. Next time.....
    Jason - You are correct also. The code I was running was not specific to the QuickStart board. I think my Arduino experience led me astray on this one.
    Electrodude - Thank you for the code. It blinked the pin 16 led very nicely. I changed it to blink pin 17 just for fun.
    Jason - Thank you for the code also. I had to change the (true) to (1) to get it to compile but it blinks the led very nicely also.

    Thanks again

    Will
Sign In or Register to comment.