Shop OBEX P1 Docs P2 Docs Learn Events
Harvesting Pins — Parallax Forums

Harvesting Pins

HumanoidoHumanoido Posts: 5,770
edited 2011-09-02 21:58 in Propeller 1
On the Parallax Demo board, can you find any extra pins for LEDs

(without cutting up the circuits or interfering with other things)?

Here are the pins already in use with connected LEDs:

P0-P7
P16-P23
P12-P15

Here are some pins on the recycle dream list:

P8-P11
P24-P27
28 and 29 are on the eeprom
30 and 31 are for USB

It looks like some PS2 connectors are needed, which I don't have access to. Finding the RCA TV connector was easy.

Humanoido

Comments

  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2010-08-22 01:48
    I have taken the VGA down to a simpler 4 pin version, but you already quote all of those as LED already. Then there is the composite TV 4 pins as you also state. I assume then that you do not require any form of screened output. I have also put PS2 KBD onto the EEPROM pins after bootup, via a 4053 multiplexer.

    To get a lot more pins for LEDs then either,extra output ports will have to be added (74HC595 I believe) or some Charlieplexing used. I have seen that on threads before, but I have never used it.
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2010-08-22 03:45
    Just get a proto board and add some female headers and a breadboard.
    800 x 600 - 105K
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-08-22 14:48
    Just get a proto board and add some female headers and a breadboard.
    I thought about that too, then realized I could harvest a lot more pins on the Demo Board using connectors. I'm sure the TV, keyboard and mouse pins can be added to the number of usable pins with just a few simple connectors and no soldering needed. This is a new idea that just came up. But I don't know about the headset jack. It has the amp chip in the circuit.

    Humanoido
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-08-22 14:53
    I have taken the VGA down to a simpler 4 pin version, but you already quote all of those as LED already. Then there is the composite TV 4 pins as you also state. I assume then that you do not require any form of screened output. I have also put PS2 KBD onto the EEPROM pins after bootup, via a 4053 multiplexer. To get a lot more pins for LEDs then either, extra output ports will have to be added (74HC595 I believe) or some Charlieplexing used. I have seen that on threads before, but I have never used it.
    Toby, at this point in the project, no TV is needed. I didn't know about putting the PS2 KBD on the EEPEOM after boot with the 4053. Do you have a thread about this with software and wiring diagram? I like to recycle pins.

    Humanoido
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-08-22 15:19
    Here's a summary so far, and some questions.

    How to Reclimate Pins for LEDs (Demo Board)
    P0 - P7 Main Header = 8 pins (Vss)
    P16 - P23 LEDs on Board = 8 pins (Vss)
    P12 - P15 TV = 4 pins (Vss)
    P24 - P25 Mouse = 2 pins (Vdd)
    P26-P27 Keyboard = 2 pins (Vdd)
    P29 EEPROM = 1 pin (after booting, Vdd)

    total 25 pins

    Questions
    P28 goes to the eeprom chip. Any way to use this pin to drive an LED?
    P30, P32 go to the USB chip. Can these be used for LEDs?
    P10, P11 go to the Headphone Amp chip. Any way to used these ports?
    P8, P9 go to the Electret Mic. Can LEDs hook on these lines safely?

    total 7 pins
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-08-23 08:11
    Since ports P12-15 tie together at the TV jack, only
    one pin can be used. So we will use pin 15.

    Pins for LEDs (Demo Board)
    P0 - P7 Main Header = 8 pins (Vss)
    P15 TV = 1 pin (Vss)
    P16 - P23 LEDs on Board = 8 pins (Vss)
    total 17 pins

    The mouse and keyboard port lines do not end up tied together so they should be usable. That will gain 4 pins.

    P24-P25 Mouse = 2 pins (Vdd)
    P26-P27 Keyboard = 2 pins (Vdd)

    I don't see any way to connect to the 2 ports that lead to the eeprom line, so scrub this idea.
    So it now looks like I can connect LEDs to only 21 pins on the Demo Board. Is that right?

    Humanoido
  • T ChapT Chap Posts: 4,223
    edited 2010-08-23 08:18
    Why can't you solder directly to the eeprom lines at the eeprom or Prop, add a PCF8575 to the lines and give yourself 16 outputs for sinking 16 LEDs.
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-08-23 11:53
    T Chap wrote: »
    Why can't you solder directly to the eeprom lines at the eeprom or Prop, add a PCF8575 to the lines and give yourself 16 outputs for sinking 16 LEDs.
    T Chap, it's a good idea with the DIP ICs. Both the prop and the eeprom are tiny little surface mount devices and it's not easy to solder on the Demo Board, so I decided to expand the LEDs by plugging into the provided jacks. Is there a Forum post that tells how to setup and program the PCF8575 approach with the prop?

    Humanoido
  • jazzedjazzed Posts: 11,803
    edited 2010-08-23 12:05
    Humanoido wrote: »
    I don't see any way to connect to the 2 ports that lead to the eeprom line, so scrub this idea.
    If you force the EEPROM SDA pin 29 high forever after boot (for example: dira[29]~~ outa[29]~~), then you can use SCL pin 28 any way you like. This is possible because a start or stop condition in the protocol requires SDA to be low; if you keep it high, the device ignores the SCL pin.

    --Steve
  • localrogerlocalroger Posts: 3,452
    edited 2010-08-23 12:19
    I'm with Ron Czapala on this; if you're using this little of the Demoboard's built-in functionality and working this hard to liberate its dedicated pins, you're using the wrong product. Use a protoboard or PropRPM (the latter being entirely thru-hole so you can work with the EEPROM and programming lines, but you'll need a serial port and cable or usb-serial to program it). Or for super cheap get a prop, a resonator, a couple of bypass caps, and use the demoboard 3v3 regulated supply to power up a DIP40 prop on a separate breadboard.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2010-08-23 12:37
    Humanoido, If you're going to allow external chips to drive LED you can add lots. I haven't used a PCF8575 but I have used 74HC595 shift registers. There's a nice object for the 74HC595 that lets you daisy chain four together. So with three pins you can control 32 LEDs (using four 74HC595) . I'm pretty sure you can add additional shift registers using the same pins (I don't know how) because I watch a youtube video of a guy (some famous hacker) making a pinball game. He had a whole bunch of shift registers he was soldering together. He stacked them on top or each other and bent any unshared pins outwards. He used the shift registers to drive an LED display. It was pretty darn cool. I know he was using a Propeller to control it.

    An advantage to using an external chip to drive LEDs is you don't have to worry about burning out you Prop with all the current need to drive the LEDs.

    I have a feeling this isn't just about driving lots of LEDs. I'm guessing it's about driving lots of LEDs with a Demo Board.

    After startup, I think you should be able to use pins 28 - 31 to drive LEDs. How would you access the pins without soldering to the board?

    Duane

    PS localroger posted while I was writing. I know Humanoido has lots of Proto Boards (see his avatar). I'm guessing this is another insane (how do I cross out? I mean inspired) project.:smilewinkgrin:
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2010-08-23 14:23
    To get the KBD onto the EEPROM pins, as soon as the boot had completed, I used the starting up of the horizontal syncs to throw the 4053 using a simple diode pump. This will be of no use to you if there is no TV/VGA. To use a pin to throw would be a bit self defeating. I was trying to bend a Dracblade to allow a vast number of spare pins for diferent memory arrangements.
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-08-24 07:01
    Wow, this thread has lots of good ideas. Thanks to everyone who posted. The demo board is set up with 17 LEDs on 17 pins. One LED is on 4 ports (TV circuit) so it can test each of four drivers in the software. I will use this setup to test programs that can function with a purpose to use up to 17 LEDs. However, the project is increasing to use all the pins on the Propeller chip. As suggested, after examining the Proto Board, the best route is to wire a prop chip on a breadboard and use all 32 unobstructed pins to control 32 LEDs. Each pin has a rating that can sink at least 10mA from a single LED. With no soldering required and fast setup & rewiring possible, this is the next step. Humanoido

    attachment.php?attachmentid=72698&d=1282658449
    Seen at left, the RCA jack connects to four LEDs. The TV circuit has pins connected
    together so the four LEDs at left can be lit one at a time using any one of the four
    connected pins.
    634 x 452 - 59K
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2010-08-24 07:20
    32 x 10mA might be within spec of the Prop, but I think it would be kinder to it if the LEDs were on buffer outputs, such as 2803s (This might just be me nursing along my remaining four chips).
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-08-24 10:52
    32 x 10mA might be within spec of the Prop, but I think it would be kinder to it if the LEDs were on buffer outputs, such as 2803s (This might just be me nursing along my remaining four chips).
    I agree, it will be more taxing on the chip. The only buffering is a 100 ohm resistor in series with the pin. I was going by the posted specs at the Parallax web site. Each LED is 10mA average, about 4 times under the top sinking ability of each pin.

    http://www.parallax.com/Store/Microcontrollers/PropellerChips/tabid/142/CategoryID/18/List/0/SortField/0/Level/a/ProductID/332/Default.aspx

    Parallax said "P0-P31: General purpose I/O. Can source/sink 40 mA each at 3.3 VDC"

    Humanoido
  • Duane DegnDuane Degn Posts: 10,588
    edited 2010-08-24 11:54
    The older manual lists the limit as 30 mA each. It also states each group of eight pins shouldn't source/sink more than 100 mA total. So if you have all eight leds in a group on, the current to/from each should be limited to 12.5 mA.

    I couldn't find information about an eight pin group in the newer manual. Does anyone know if the limit for a group has also been changed?

    Duane

    Edit: Your 10 mA each of course should be fine.
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-08-24 12:04
    Duane Degn wrote: »
    The older manual lists the limit as 30 mA each. It also states each group of eight pins shouldn't source/sink more than 100 mA total. So if you have all eight leds in a group on, the current to/from each should be limited to 12.5 mA. I couldn't find information about an eight pin group in the newer manual. Does anyone know if the limit for a group has also been changed? Duane

    Edit: Your 10 mA each of course should be fine.
    Duane Degn, thanks for the info - I would tend to believe the lesser (30mA) value limit over the 40mA, even being listed in the older manual. (nice find, btw)

    Has anyone put 32 LEDs directly on a prop? With all the LED projects, I would think someone has already tried this. The project does fit the specs but the milliamp draw is right near the limit.

    Another point, these LEDs will all be in some state of blinking, so not using their 10mA in full constant on mode. So the combined draw should be less than 32x10mA. However, when they are on, they do draw 10mA from their ports. But as a group of eight, the combined mA is less.

    Exactly what constitutes a group of eight? Beginning with p0 through p7 as the 1st group?

    Humanoido
  • John AbshierJohn Abshier Posts: 1,116
    edited 2010-08-24 12:17
    The data sheet lists the following absolute maximum ratings. Max current per IO pin 40 mA. Max current out of Vss pins/into Vdd pins: 300mA. My old eyes read 8 cogs running at 80 MHz burn 100 mA, leaving 200 mA for IO pins. Of course you want to not operate at the absolute maximum rating.

    John Abshier
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-08-24 13:58
    The data sheet lists the following absolute maximum ratings. Max current per IO pin 40 mA. Max current out of Vss pins/into Vdd pins: 300mA. My old eyes read 8 cogs running at 80 MHz burn 100 mA, leaving 200 mA for IO pins. Of course you want to not operate at the absolute maximum rating. John Abshier
    John, thanks, that's an important consideration to include the eight props current draw into the LED equation. Best thing now, since the led are blinking, is to fire up each bank of eight, and check the current draw so as not to go over a total of 200 mA. Tests in blocks of 16 could be alternated.

    Humanoido
  • Duane DegnDuane Degn Posts: 10,588
    edited 2010-08-24 14:43
    Humanoido,

    I'd bet a proto board that P0 through P7 is considered the first group. P8 - P15 the second etc.. I don't want to stop and find in the manual, but that's what I remember.

    Duane
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-08-26 13:12
    Duane Degn wrote: »
    Humanoido, I'd bet a proto board that P0 through P7 is considered the first group. P8 - P15 the second etc.. I don't want to stop and find in the manual, but that's what I remember. Duane
    Duane, thank you, the banking worked perfect as you suggested. In conclusion, the Demo Board is outstanding for handling LEDs on two banks of 16 pins total. As bonus pins leading to a third bank, the TV, mouse and keyboard circuits can be harvested, making the DB one of the most versatile boards that Parallax offers.

    For creating even more banks, a single home-brew circuit works well. The attachment shows a new test board, designed to supplement the Demo Board. It was put together in 20 minutes, mainly from resistors and LEDs. This is the virtue of breadboards. The new board can handle every pin on the prop, and it's decoupled and clock enhanced yet can be rewired in only a few seconds. As you can see, it was decided to have the power supply external to the breadboard.

    Humanodo

    attachment.php?attachmentid=72761&d=1282853644
    Banks of LEDs connect to the Propeller
    Chip through these 100 ohm resistors on
    a 3.3-volt circuit.
    305 x 425 - 32K
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-09-02 20:33
    Sorry about resurrecting an old thread, but there are some interesting comments on this thread about recycling the eeprom pins using a 4053.

    I have an idea that you could recycle these pins to create a 2 wire bus for inter prop communications.

    Maybe this has been thought of before, but the idea would be to have a 4053 and when there is a reset, discharge a capacitor via a diode. When the cap is low, the eeprom is connected. Then charge the cap up over a couple of seconds, and when it is charged, the eeprom is disconnected and the P28/P29 are connected to the bus. Maybe via 100R resistors.

    The bus could use any sort of software protocol.

    Has this been done before?
  • Mike GreenMike Green Posts: 23,101
    edited 2011-09-02 20:41
    Do keep in mind that the I/O pins used for other purposes have things like series resistors that would prevent you from just hooking up LEDs to those pins at the various sockets. How do you plan to get access to the actual I/O pins? solder a small wire to them? The VGA pins interact in groups and the TV pins interact as well, both via their DAC resistors.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-09-02 20:44
    Dr_A,

    I wouldn't go to all that trouble. Just come up with a protocol that doesn't generate an I2C START condition, and the EEPROM will simply ignore anything that goes on. And if the protocol itself detects a START condition, it ignores everything between it and the corresponding STOP condition. Either that or use an I2C communications protocol that works from an I2C device ID different from the EEPROM's.

    -Phil
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-09-02 21:18
    Yes I was thinking about that too. But - if two propellers boot up at the same time and they have pins 28 and 29 connected (eg via 100R or 1k resistors), then won't they get muddled trying to read each other's eeproms?

    So I figured that if you have to disconnect the propellers from each other at bootup, then that will involve something like a 4066/4051/4052/4053, and if you have that, then you may as well disconnect the eeprom with a SPDT 4053 like Toby was doing earlier in this thread with his keyboard.

    Or... maybe there is another way. In any multiprop setup, master/slave is more deterministic than peer to peer, so if one prop is the master, could you load the other props via pins 30/31?

    Hmm - but then the master has to boot first and hold the slaves in reset until the master is ready. Which adds some more complexity.
  • kuronekokuroneko Posts: 3,623
    edited 2011-09-02 21:26
    Dr_Acula wrote: »
    Hmm - but then the master has to boot first and hold the slaves in reset until the master is ready. Which adds some more complexity.
    Why? What (damage) are the slaves going to do before they are booted from the master?
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-09-02 21:44
    No damage if the master has control over the slaves reset. Then it can control a coordinated startup one at a time.

    I was thinking more of two boards, each with their eeprom, reset circuit and download circuit, mainly because such a setup might be easier to debug rather than feeding all the data through the master.

    If you power up these boards at the same time, no damage would happen to the propellers, but wouldn't the eeprom data be corrupted with multiple propellers trying to read the eeproms?
  • kuronekokuroneko Posts: 3,623
    edited 2011-09-02 21:58
    So you have more than 2 chips involved (I can see that eating up pins)? My comment was referring to a 2 chip setup where the master controls reset and has two more pins dedicated (e.g. 4/5) to be linked to the slave's 30/31. In this scenario both boot up normally from their own EEPROM and link up later.

    The boot link is later re-used as a normal communication link so apart from the reset pin I don't really lose anything.
Sign In or Register to comment.