Shop OBEX P1 Docs P2 Docs Learn Events
Arrays in Spin? — Parallax Forums

Arrays in Spin?

adriadri Posts: 34
edited 2009-06-15 22:38 in Propeller 1
Hi

I'm new to the Propeller and to Microcontrollers in general. I have a background in PC programming. I'm wanting to fill an array with values from an ADC. Any suggestions as to the Spin for the array part would be most welcome.

Any general tutorials in Spin would also be a plus. Are there any out there?

Many thanks

Adri

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-06-15 22:38
    The Propeller Education Kit tutorials would be useful. There are also some beginner's tutorials in the "sticky" thread called "Propeller: Getting Started and Key Thread Index".

    There's nothing fancy about arrays in Spin. They're one dimensional. You have to declare them with the array size. Subscripts range from zero to the array size - 1.

    Look in the object exchange for existing I/O drivers for a variety of ADCs. The Propeller can also do its own sigma-delta ADC with a couple of resistors and a capacitor. Download the application note (AN001) on the cog counters for details and examples (www.parallax.com/tabid/442/Default.aspx).
Sign In or Register to comment.