PWMPAL for propeller chip
david001
Posts: 4
The documentation for PWMPAL says
Has anyone used it with Propeller? If it is not straight forward, is there any hack?
I do not want to use my cog to generate PWM signals. This chip will work beautifully for me to generate PWM signals as well as interface a few. If ths chip wont work, is there an alternative?
Thanks:smilewinkgrin:
The PWMPAL is an intelligent peripheral that adds up to four PWM output channels and up to four
control/counter input channels to the 24-pin versions of the BASIC Stamp® microcontroller.
Has anyone used it with Propeller? If it is not straight forward, is there any hack?
I do not want to use my cog to generate PWM signals. This chip will work beautifully for me to generate PWM signals as well as interface a few. If ths chip wont work, is there an alternative?
Thanks:smilewinkgrin:
Comments
The PWMPAL is a 5V device, so it needs a source of 5V power (+5V on pin 21 (Vdd) and ground on pin 23 (Vss)). It also needs a bidirectional serial port. You get that by taking a 2.2K resistor and connecting it between the PWMPAL's pin 0 and whatever Propeller I/O pin you want to use. You can use either the Simple_Serial or the BS2_Functions object from the Propeller Object Exchange to send and receive information from the PWMPAL. I suggest BS2_Functions because it mirrors the BS2 statements that you'd use with a Basic Stamp.
If you change your mind, you can use the PWM_32_v2 object from the Object Exchange to generate as many as 32 PWM signals on the Propeller's I/O pins.
My other conern is that I want to save pins as well. So lets say I have two inputs and two outputs, PWM module is probably going to serve me better (althogh it will take some space).
Just another question, Can i interface PWM signal (input) with a counter inside propeller? How much of total overhead do you think it will be.
Again I am inclined towards PWMPAL if it can do the job cleanly. Otherwise the choice is really open.
Many thanks
Note, too, that the serial connection to the PWMPAL could use another cog and this interface limits its resolution.
Now if I can interface PWM's inputs in the same COG (PWM_32_v2), then probably I will be tempted to use a cog. I guess I have to explore.
The PWMPAL is $30. vs $8 for the Propeller. Don't get me wrong, the PWMPAL is a great chip.
The max communications speed for the PWMPAL is 38K baud and is half-duplex, (one pin). Intercommunication speed between the Props is much faster and is full duplex.
The speed issues may not be a concern, but I thought I'd bring them up.
Jim
I am actually novice with propeller but have good experience with FPGA's. It seems like propeller is as flexible as an FPGA chip. But I think I might be wrong a bit.