Shop OBEX P1 Docs P2 Docs Learn Events
Slow-downs in program, BASIC Stamp limitation? - Page 2 — Parallax Forums

Slow-downs in program, BASIC Stamp limitation?

2»

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-23 14:44
    They come in all sorts of frequencies (of which Parallax stocks a few). The faster a microprocessor goes (or any logic), the more power it takes. If you slow down a processor, it can't do as much. For example, if you're trying to produce video, like for a game, you have to get those pixels out about once every 200ns for a 320 pixel width display. If it takes 10 instructions to figure out the pixel value, that's a clock of 50MHz if you do one instruction per clock cycle.
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-06-23 15:19
    To restate what Mike has said:

    Different resonators give you different clock speeds for the processor.
    If you 'don't care' about the power used, you'd put in a 50 Mhz Resonator, and your processor would run at 50 MIPS with minimal interrupt latency and highest performance.

    If you are going to be running on battery, you might put in a 5 Mhz or less resonator, and your processor would run at 5 MIPS but take MUCH less current from the battery.

    When you compile your code, you tell your code with a "pseudo-operation" keyword what frequency the chip will be running at. This lets the SX/Basic compiler adjust the SX/Basic routines so baud rates stay correct, and adjust any other "time sensitive" operation to use the specified frequency.
  • randempedestrianrandempedestrian Posts: 14
    edited 2008-06-23 15:44
    Ah, I understand. Cool stuff!

    Last night I ordered the Tech Tool Kit. Buying only the Tech board and USB SX-Key would have been $90, so I figured for the same price I'd get both of them, chips, resonators, the little display, and both books. (Seems like the one book Programming the SX Microcontroller (by Gunther Daubach) isn't available for download).

    So yeah, I figure I'll buy a proto board once I learn how to program and sue the SX.

    Oh, and maybe you can help me out with this: In response to my problems with the AD5220 digital pot early in this thread, Bobb Fwed mentioned that (most of) the MCP4XXX are dp that take a single command to move the wiper. I'd really like to buy one or more of these, but Microchips website confuses the heck out of me with all the choices. This page www.microchip.com/ParamChartSearch/chart.aspx?branchID=11026&mid=11&lang=en&pageId=79 is for the MCP4XXX. I'm so confused.

    1. I understand the number of taps, but why then does the Resistance column list just a few specific values for each?

    2. I understand the Interface part.. Up/Down protocol being the same as the AD5220, and SPI the single command, serial peripheral interface, etc etc?

    3. I looked up INL and DNL, but I have no clue what they actually really mean. I get the feeling it's not too important for my purposes though?

    4. Volatile/NonVolatile, i'm assuming just means that one remembers its position when it looses power and the other doesn't?

    5. Okay..here's what confuses me most... the Packages column. I know that they're just simply that, the packages (like the SX28 built in chip vs. the pluggable one), but there's so many different letter and number codes that I don't understand, and so many combinations of packages to each of the other characteristics...it just boggles my mind. How would I go about finding something that looks like the AD5220?

    I guess I basically want: greater number of taps, higher max resistance, SPI, not sure if I want volatile or non, and the same package as the AD5220.

    Thank you!!
Sign In or Register to comment.