PDA

View Full Version : Propeller Chip Pins (newbie alert)



RICoder
01-18-2009, 02:38 AM
I just got my propeller chip and I'm looking at the schematic for it, my question has to do with COG access to the pins.

My final plan is to use it to control a hexapod, with a COG dedicated to each leg. That said:

I've noticed that there are 32 pins for I/O and that is probably enough (figuring 3 per leg = 18) leaving me with some 14 pins to play with. My curiosity is about re-using pins for different COGS, or really for the same COG just with different purpose.

Consider this as an example:
I have 2x 7 Segment LEDs and want to use them for a 2 digit display. They require 8 pins each (plus Vss/Vdd). Suppose I wanted to control BOTH of these with the same 8 pins. Is there some wiring solution where I could adjust the output of a pin to dictate which module it is talking to?

I've thought about it, and think I could probably pull it off with some fancy ADC/DAC conversion, but that would be expensive and probably overkill.

Am I nuts? Is this something that would even be possible?

Leon
01-18-2009, 02:53 AM
You only need nine pins if you multiplex the displays.

Leon

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

RICoder
01-18-2009, 03:54 AM
So, I could buy a multiplexer and send in a signal from the same pin and somehow it will know which pin to output to? That makes sense I think, having never used a multiplexer. Like this one?

http://www.sparkfun.com/commerce/product_info.php?products_id=299

?

Leon
01-18-2009, 04:20 AM
You do the multiplexing in software - switching between the two displays at 100 Hz, say.

There is some code in the Exchange for 1-8 digits.

Leon

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

Post Edited (Leon) : 1/17/2009 10:33:46 PM GMT

mctrivia
01-18-2009, 05:45 AM
you can use a binary to bcd decoder to get only 4 pins needed for each. 5 total if you have an inverter and use the second pin to decide wich is displayed

RICoder
01-18-2009, 09:51 AM
Like I said, I'm a newbie to this so elaboration would help.

From what I can see a Binary to BCD decoder would be helpful, and I can see how, but I can't seem to find a chip that encapsulates one. What I have found are schematics using NOT and AND gates to build them such that for each PIN you add to the group, you effectively double the number of output PINs (so 3 PINs would give me 8 output, 4 would give me 16).

mctrivia
01-18-2009, 11:57 AM
try this ic http://www.doctronics.co.uk/4511.htm

mctrivia
01-18-2009, 11:59 AM
for my 60x14 led display i am building I am using 24x 5x7 dot grids and 5x 74HC154E ics to allow me to turn each dot on through only 10 lines.

StefanL38
01-18-2009, 03:23 PM
@ mctrivia,

if you use 74HC595 which is a serial in parallal out shiftregister with latch you can reduce the number of IO-lines to 3 !
You can cascade the 74HC595 to ANY amount you need f.e. with 3 595ers you get 3x8=24 IO-Pins
with 10 595ers 80 IO-lines

Of course the serial transmission of the data takes some time. For a display it's fast enough even in SPIN

best regards

Stefan

mctrivia
01-19-2009, 12:23 AM
StefanL38

yes that is true and I wrote the code for a serial option.

The screen is small enough I could just use a 10bit counter and a on off state to do it all in 2 io lines but I have enough IO lines to do it in paralel so I am saving the cost on the extra ic. my only problem so far is my 7404 inverter does not work for obvious reasons(5v ic) and building an inverter with transisters and resisters to replace does not seem to be working for me to drive the 74HC595 enable pins