Bobb Fwed said...
Now why does SPIN use more power than PASM? Do hub operation draw more power?
Bobb,
Why do you think SPIN uses more power than PASM?· Have you actually measured an increase in the current used by the Propeller?· The amount of current does depend on the number of transistors that are switching and the rate that they switch.· It would make sense that programs accessing the hub would draw more current.
Dave
@Bobb Fwed - You're probably looking at the graphs in the Propeller Datasheet that show increased power consumption for a REPEAT loop vs. a JMP loop. The JMP loop involves continuous fetching and execution of instructions with no waits and no access to the hub. A REPEAT loop involves continuous fetching and execution of instructions, but includes frequent accesses to hub memory and the hub logic which increase the power consumption substantially. You'd have to look at the source of the Spin interpreter to see how often the hub is accessed.
So it is purely based on how often the hub is accessed. If you have a program in PASM that doesn't use any hub operations compared to a SPIN program (which always uses hub operations, but may change the frequency of hubops depending on the operations being executed) the SPIN should always use more power, it is just a matter of how much. Right?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Comments
Why do you think SPIN uses more power than PASM?· Have you actually measured an increase in the current used by the Propeller?· The amount of current does depend on the number of transistors that are switching and the rate that they switch.· It would make sense that programs accessing the hub would draw more current.
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!