Shop OBEX P1 Docs P2 Docs Learn Events
Newbie Questions — Parallax Forums

Newbie Questions

HollyMinkowskiHollyMinkowski Posts: 1,398
edited 2009-05-28 19:43 in Propeller 1
I just ran across the Propeller chip 2 days ago, I have been using the AVR controllers mostly but the Propeller sure looks like it might be fun.
The idea of no interrupts is a bit scary though! I'm so used to interrupt programming.
I am about to start a new project and was going to use the ATmega644p but since this part and the Propeller are exactly the same price I'm considering
using the Prop. I program the AVRs in C and asm. I see that there is a C for the prop but not a free one like the gcc toolchain for the AVR and ARM.

From what I have read the Propeller seems to require an external 32kb eeprom??? I wonder why they did not put 32kb of flash or eeprom right on the chip???
The external eeprom seems like a poor choice...but maybe there is a reason that makes sense???

I'm used to storing log data in the AVR flash and eeprom regions so that it is available the next time the controller powers up. Can I easily store data bytes in
the external eeprom required for the Propeller so that it is not lost between runs??? And is it easy to use a larger eeprom both to load the 32kb start-up code
and a lot of logged data? Also, is it possible to modify the Propellers program code at runtime? I'm talking about writing a custom bootloader here...so that I can reprogram
the Propeller using serial IO or whatever.

The one thing that really makes me crave the Propeller is its ability to output video to a vga monitor smile.gif This is so appealing that I would be willing to combine an AVR
and a prop in the same project just so I could pull data from the AVR and display it with the prop....it would add little to the project cost. If I dedicated all but one
Propeller core to vga video what is the best resolution I could expect to output ? I'd like to output 1440x700 or even 1680x1050 ... is that possible?

The lack of built in features is a little troubling since I am not a hardware guru at all..are there plenty of examples showing how to do simple things like
ADC, serial IO..etc?

Holly...

Comments

  • LeonLeon Posts: 7,620
    edited 2009-05-28 15:28
    The process used doesn't allow on-chip flash/EEPROM.

    You can store stuff in external memory, but you need a bigger chip. See the Object Exchange on the Parallax web site for useful functions

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • RaymanRayman Posts: 14,827
    edited 2009-05-28 16:02
    Welcome Holly!·

    Output to VGA is the reason I picked the Prop too!

    I think I've seen 1600x1200 using 4 cogs.· Check the "Object Exchange" for the driver.

    Combining the AVR with the Prop sounds like a great idea!

    There may be a way to store the Prop code on the AVR so as to avoid the need for an external EEPROM...





    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • Mike GreenMike Green Posts: 23,101
    edited 2009-05-28 16:24
    You can get EEPROMs up to 128K bytes (Atmel 24C1024B works nicely) and use those instead of the minimum 32K. You could attach up to 4 (512K) to the same I/O pins. The ROM bootloader only looks at the 1st 32K, but there's all sorts of code available for accessing the rest of it including the boot area. Even with only a 32K EEPROM, it's possible to store data in whatever portion of the EEPROM isn't needed for your program. It will get overwritten if you download a new program to the EEPROM, but otherwise will remain untouched.

    There are text display drivers for a 1600 x 1200 pixel display, but there's not much left available in the Propeller to make use of it. Because of the data rate needed, the driver uses 7 out of 8 cogs (6 if you leave out the cursor) and most of the RAM is used for the display buffer. High resolution graphics (more than 512 x 384) is not doable because of the memory requirements.

    There are plenty of examples (and ready-to-use code) for all kinds of I/O. Have a look through the Propeller Object Exchange (obex.parallax.com/). The Propeller was designed specifically to have all I/O done in software. Its flexibility that way is a feature.

    One cog, for example, can provide up to 4 full-duplex serial ports with aggregate speed of 400-500KBps. A nice 80 x 40 VGA text display would use 2 cogs. A PS/2 keyboard handler takes a cog and there's one I/O driver that combines a PS/2 keyboard and PS/2 mouse driver in one cog. You can have two ADCs using one cog or one ADC and one DAC. Full IEEE floating point at a very reasonable speed takes two cogs. There's even a very nice vocal tract synthesizer that can sort-of sing 4 parts in stereo with spatial synthesis and the voices separated around the stereo soundspace.
  • StefanL38StefanL38 Posts: 2,292
    edited 2009-05-28 18:52
    Hello,

    if you need an spi-interface dedicate a cog to it (sourcecode free available in the obex)
    and never care about will the interrupttimewindow be long enough as the routine runs
    in its own cog compelety independendly the only limit is buffer-ram

    if you need an I2S-interface decicate a cog to it (sourcecode free available in the obex)

    if you need PWM just use the onboard counters (sourcecode free available in the obex)

    if you need two counters use the two counters of one cog (sourcecode free available in the obex)
    (counting independent of what the cog is doing)

    selfmodifyng code can modify itself a billion times as your whole program
    runs in RAM

    if you want to store data on an SD-card up to 2 GB use the sd-card routines found (sourcecode free available in the obex)

    look through the obex there are a lot of sourcecode-objects for a lot of different kind of sensors
    even GPS-data parsing

    best regards

    Stefan
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2009-05-28 19:20
    @Leon .... .. .... .. smile.gif

    @Raymon Yes, I see no reason why I cannot mix a Propeller and an AVR on one board smile.gif

    @Mike Green Thanks for the help, I see you wrote several of the objects in the library.
    I think we may have some of those Atmel eeprom parts you mentioned. I guess I could
    piggy back one on top of the Propeller to cut down board clutter..it would be almost the
    same as if it were integrated into the Propeller wink.gif

    @StefanL38 Yes, looks like I won't have to re-invent the wheel after all. How much circuitry
    needs to be added to interface an sd card? I have a bunch of class two 256mb parts. Be cool if
    I could pretty much just hot glue one to the board and solder leads to the contacts smile.gif


    Another question: I have lots of 20mhz crystals on hand, will they work fine in place of the 5mhz units that seem common to Propeller
    projects? And will they be able to be multiplied by 4 for an 80mhz internal clock?
  • LeonLeon Posts: 7,620
    edited 2009-05-28 19:26
    Maximum is 8 MHz if using the PLL, according to the data sheet. 10 MHz is frequently used, though, and works OK.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-05-28 19:34
    My current understanding is that the max. crystal frequency with the PLL switched on is just a bit more than 10MHz. With a 20MHz crystal you would have to switch off the PLL and run with 20MHz clock frequency, which means 5Mips per COG instead of 20Mips per COG.
  • LeonLeon Posts: 7,620
    edited 2009-05-28 19:43
    Yes, it would be 40 MIPS total.

    The data sheet actually states that an 8 MHz crystal is the maximum with the PLL. I prefer to stick to device specifications, but I'm fussy about that sort of thing. smile.gif

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle

    Post Edited (Leon) : 5/28/2009 7:48:48 PM GMT
Sign In or Register to comment.