Propeller SPIN Blink an LED
microcontrolleruser
Posts: 1,194
We're going in!
Using Prop Pro board. Grey one. Revision A maybe.
Will start looking for lesson for that.
If nothing else I know there is one in PEKit Fundamentals text.
Comments
Using Propeller Tool compiler.
Reading this from Help section.
About the Propeller Chip Hardware
Says to read it and How the Propeller Tool Works before blinking an LED.
Got the Prop Pro board out. Will look for a power supply. Think it can take up to a 12v.Stamp boards are only up to 7.5
Found Blink an LED program in Prop Tool Help tutorial.
Should have that LED blinking soon!
There's a product page for the Propeller Professional Development Board (PPDB) on the main Parallax website. That should give the power supply requirements.
Okay.
I will make Pro Board manual an icon on desktop.
It used to be a download at bottom of product page.
EDIT
Have the manual version 1.0 for grey Pro Board.
Using BOEBot battery pack 6v. It doesn't have cord to trip over.
Do not "make the Pro Board manual on icon". Print it out. Using your printer. On Paper. It is only 3 sheets (double-sided). Print out the schematic as well. Go study them. Say for at least an entire hour. Then ask more questions.
Tom
Have an observation and a question.
Wasn't paying attention and the first source code says right on it 'Lesson 2'.
Lesson 1 explains some stuff.
Says when you put objects in an application it compiles.
So Propeller tool does compile at some point but interprets when it just a snippet of code?
Mike
Yep. Like a template. Thanks.
Here's a picture of Pro Board.
It came out upside down.
Daisy chained from PIN 16 to LED. Too lazy to find long jumper wires.
Can you explain that a different way please? EDIT I mean about the Prop. Our posts crossed.
A PIC you do like this:
Compile code to hex.
Download hex to PIC.
It starts running immediately when it is powered up.
Can you just say the first thing Propeller tool does?
Maybe that will clear it up.
Mike
Just to help out I read Help.
If you have a snippet and load to RAM it works like a PIC.
More or less.
Think there is that 'compiles to "interpreter code" ' not hex wrinkle.
This is leaving out 'COG's'. Stuff about moving 'your program' from hub to cog.
Tom
That's the 'still photo studio'.
12" x 24" piece of ceiling tile from Home Depot.
Yes. We do use a power supply and a USB cable.
The chip powers up or the reset line is allowed to go high.
The bootloader is started (from masked ROM on-chip) by loading it into cog 0 RAM
The bootloader looks for a serial port on I/O pins 30/31 (pin 31 high)
... if present, negotiates Baud with PC and downloads program to hub RAM
... if successful download, starts Spin interpreter in cog 0 on hub RAM contents
The bootloader looks for I2C EEPROM on I/O pins 28/29
... if present, copies 1st 32K of EEPROM to hub RAM
... if checksum correct, starts Spin interpreter in cog 0 on hub RAM contents
If the Spin program in hub RAM contains some assembly code, it (the Spin code) will
eventually execute one or more COGNEW or COGINIT statements which will be interpreted
and execute the equivalent COGINIT instruction that will copy a block of hub memory into a
cog and start that cog running from cog location 0 with that cog's special registers
(memory mapped) initialized to zero (except PAR which is initialized from the COGINIT).
It just repeats the same message.
Ignore the commented out sections using single or double braces.
So here one is.
Tom
Thanks. It was in one of my posts.
Propeller Tool/Help/Tutorial/Exercise 3. There is no Exercise 1 or 2 source code.
BTW Just 'Detected Device' about to compile and run.
It blinks!
Think I am going to take some time to savor the moment.
To run on the slower Internal RC oscillator, remove the _clkmode and _xinfreq lines.
Blink ten times with each time different off period.
Mike
Thank you for doing that.
Actually going to bounce over to Stamp 1 Stepper project.
I am a lightweight around here. Not one of the heavyweights that can knock out the code.
Plus build hardware at will.
I'm just one of the 'little guys'.
Mike
Appreciate it!
You will have to pull the weight around here.
Long sessions at the workbench with the soldering iron and schematics.
Coding for hours with a box of pizza and sodas.