Shop OBEX P1 Docs P2 Docs Learn Events
2 things on P30/TX — Parallax Forums

2 things on P30/TX

TCTC Posts: 1,019
edited 2014-03-20 08:19 in Propeller 1
Hello all,

I am running out of pins for my project and I was thinking, "I think I can combine stuff". I have a Noritake display that only receives serial(baud = 38,400) data to work. I was wondering, would there be any problems with using the display on I/O P30? I am asking because I will still need the ability to program the prop. But under normal running conditions, the display would be the only thing using P30. Would that be OK? Or could it create problems?

Thanks
TC

Comments

  • JonnyMacJonnyMac Posts: 9,107
    edited 2014-03-20 04:55
    You'll probably end up with Smile on the display while reprogramming, and you won't be able to use the serial port for debugging.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-03-20 05:08
    TC wrote: »
    Hello all,

    I am running out of pins for my project and I was thinking, "I think I can combine stuff". I have a Noritake display that only receives serial(baud = 38,400) data to work. I was wondering, would there be any problems with using the display on I/O P30? I am asking because I will still need the ability to program the prop. But under normal running conditions, the display would be the only thing using P30. Would that be OK? Or could it create problems?

    Thanks
    TC

    It's this type of specific question where it's best not to give a specific answer because you have only presented this one possibility yet there are plenty of other pins that might be better candidates. Can you give us a list of what you connected to what, or a schematic, or something where we can come back with a better "question" and therefore a better solution.
  • TCTC Posts: 1,019
    edited 2014-03-20 05:17
    JonnyMac wrote: »
    You'll probably end up with Smile on the display while reprogramming, and you won't be able to use the serial port for debugging.

    I would be OK with that. Right after the prop boots up, the serial driver is loaded, then the display is reset. So the Smile on the display while programing would be removed. And for the debugging part, I have been using the display for debugging. Less hassle, I don't have to keep clicking "Enable" on the serial terminal when I get done with loading the prop.

    Besides those problems, would there be any concerns I should take into consideration?
  • TCTC Posts: 1,019
    edited 2014-03-20 05:33
    It's this type of specific question where it's best not to give a specific answer because you have only presented this one possibility yet there are plenty of other pins that might be better candidates. Can you give us a list of what you connected to what, or a schematic, or something where we can come back with a better "question" and therefore a better solution.

    Fair enough. Here is a list of what I want to have hooked up.
    Noritake display:
     MOSI       - serial into display
     RESET    - hard reset line, active low
     SBUSY   - Display busy
    
    Encoder:
     EncoderA
     EncoderB
     Encoder Select       - push to select
    
    Dual color button: (for start and stop) led is 2 pin model
     Red LED
     Green LED
     Button
    
    Heater Control:
     Zero Cross detect input
     Upper heater TRIAC
     Lower heater TRIAC
    
    Thermocouples:      (MAX31855) Each MAX31855 runs in its own COG along with the Heater TRIAC
     Upper Chip Select
     Upper MISO
     Upper Clock
     Lower Chip Select
     Lower MISO
     Lower Clock
    
    Real Time Clock     (Got one for free, would like to use it. DS1742)
     Data bus (8 bits)
     Address lines 0, 1, 2    (Only reading RTC)
     Chip Enable
     Read/Write
     Output Enable
    
    

    I have been running through a lot of different ideas. Been thinking of changing how the heaters are controlled, so I would be able to combine the MAX31855 data and clock lines.
  • JonnyMacJonnyMac Posts: 9,107
    edited 2014-03-20 05:37
    "Free" is very subjective. You could use a DS1307 circuit on the Propeller EEPROM pins and recover a bunch of IO. You can also have one SPI buss and use flags to control access.
  • TCTC Posts: 1,019
    edited 2014-03-20 05:48
    JonnyMac wrote: »
    "Free" is very subjective. You could use a DS1307 circuit on the Propeller EEPROM pins and recover a bunch of IO. You can also have one SPI buss and use flags to control access.

    "Free" is brand new, shipped to my door from Maxim.

    I was going to go that route, But I really did not want to deal with the crystal, and a battery. The DS1742 includes the crystal and the battery.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-03-20 05:54
    TC wrote: »
    Fair enough. Here is a list of what I want to have hooked up.
    Noritake display:
     MOSI       - serial into display
     RESET    - hard reset line, active low
     SBUSY   - Display busy
    
    Encoder:
     EncoderA
     EncoderB
     Encoder Select       - push to select
    
    Dual color button: (for start and stop) led is 2 pin model
     Red LED
     Green LED
     Button
    
    Heater Control:
     Zero Cross detect input
     Upper heater TRIAC
     Lower heater TRIAC
    
    Thermocouples:      (MAX31855) Each MAX31855 runs in its own COG along with the Heater TRIAC
     Upper Chip Select
     Upper MISO
     Upper Clock
     Lower Chip Select
     Lower MISO
     Lower Clock
    
    Real Time Clock     (Got one for free, would like to use it. DS1742)
     Data bus (8 bits)
     Address lines 0, 1, 2    (Only reading RTC)
     Chip Enable
     Read/Write
     Output Enable
    
    

    I have been running through a lot of different ideas. Been thinking of changing how the heaters are controlled, so I would be able to combine the MAX31855 data and clock lines.

    Take that DS1742 (btw, that's the batch number for the year, it's that ancient) and chuck it in the bin, then you will be free. Use the DS1307 as Jon suggested or some other I2C RTC on P28,P29 and never never ever entertain this crazy notion of a "data bus" RTC !#$@^%&~!!
    No wonder you ran out of I/O!
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2014-03-20 05:56
    Your original suggestion should be ok. But... as others have suggested, maybe there are other solutions.

    I see some of those pins are really quite simple things - button, led, etc. When pins are running out (like, always!), I tend to reserve propeller pins for complicated things like a display, keyboard, SD card, I2C bus, and then hand off simple things like buttons and leds to another chip.

    My favorite simple I/O chip is the MCP23017. It gives you 16 I/O pins and it sits on the I2C bus which is already being used for the eeprom, so effectively the MCP23017 doesn't use any more propeller pins. Perfect for things like leds and pushbuttons. Driver code is in the Obex.
  • TCTC Posts: 1,019
    edited 2014-03-20 05:59
    OK, i'll use the DS1742 for another project, maybe a desk clock.

    But what would be the best way to connect the crystal to the DS1307 while still prototyping?
  • TCTC Posts: 1,019
    edited 2014-03-20 06:06
    Dr_Acula wrote: »
    Your original suggestion should be ok. But... as others have suggested, maybe there are other solutions.

    I see some of those pins are really quite simple things - button, led, etc. When pins are running out (like, always!), I tend to reserve propeller pins for complicated things like a display, keyboard, SD card, I2C bus, and then hand off simple things like buttons and leds to another chip.

    My favorite simple I/O chip is the MCP23017. It gives you 16 I/O pins and it sits on the I2C bus which is already being used for the eeprom, so effectively the MCP23017 doesn't use any more propeller pins. Perfect for things like leds and pushbuttons. Driver code is in the Obex.

    I like that chip, not just for this project but others. Thanks
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-03-20 06:07
    TC wrote: »
    OK, i'll use the DS1742 for another project, maybe a desk clock.

    But what would be the best way to connect the crystal to the DS1307 while still prototyping?

    Seriously, just bin the clunker along with any 2708 EPROMs you might have gotten for free too. If you don't mind waiting you can get the whole DS1307 module complete for $1.56 on ebay. (btw, postage is FREE!)

    I'm not sure what you mean about best way to connect the crystal because I don't know how you are prototyping but you can always just lay the crystal over the chip and solder straight to the pins if you like.
  • TCTC Posts: 1,019
    edited 2014-03-20 06:15
    If you don't mind waiting you can get the whole DS1307 module complete for $1.56 on ebay. (btw, postage is FREE!)

    I have gotten burned by getting cheep stuff like that from eBay. The last time I ordered something it took 3 weeks to get here, found out it was wrong, took a week to have the seller fix the problem. they sent a new one. 3 weeks later I had a new same wrong part. So almost 2 months later, I did not have the part I wanted and ordered.
    I'm not sure what you mean about best way to connect the crystal because I don't know how you are prototyping but you can always just lay the crystal over the chip and solder straight to the pins if you like.

    using a standard breadboard. I thought of doing that, But I did not know if it would work or not. I was afraid I would get stray signals on the crystal lines.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-03-20 06:24
    TC wrote: »
    I have gotten burned by getting cheep stuff like that from eBay. The last time I ordered something it took 3 weeks to get here, found out it was wrong, took a week to have the seller fix the problem. they sent a new one. 3 weeks later I had a new same wrong part. So almost 2 months later, I did not have the part I wanted and ordered.



    using a standard breadboard. I thought of doing that, But I did not know if it would work or not. I was afraid I would get stray signals on the crystal lines.

    I don't know how you could order the wrong part in this case but it's your buck fifty I guess, you wouldn't want to miss it and get burned ;)

    Solder the crystal direct to the pins as mentioned and cut off the tail of the pin so it doesn't connect to the breadboard (breadboard is a broad term but I guess you mean the solderless plugin style)
  • TCTC Posts: 1,019
    edited 2014-03-20 06:34
    I don't know how you could order the wrong part in this case but it's your buck fifty I guess, you wouldn't want to miss it and get burned ;)

    It was LED 7-segment displays 50 pcs at $5USD + free shipping. I needed Common cathode, the listing said common cathode. I kept getting common anode. Seller said "That is all we have"
    Solder the crystal direct to the pins as mentioned and cut off the tail of the pin so it doesn't connect to the breadboard (breadboard is a broad term but I guess you mean the solderless plugin style)

    Yes, my style is a standard plugin style. No gold plating, just the cheap kind.

    Have you ever bought the DS1307 from eBay before? If you did, did you get what you wanted? and did it work like it should?
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-03-20 06:55
    TC wrote: »
    It was LED 7-segment displays 50 pcs at $5USD + free shipping. I needed Common cathode, the listing said common cathode. I kept getting common anode. Seller said "That is all we have"



    Yes, my style is a standard plugin style. No gold plating, just the cheap kind.

    Have you ever bought the DS1307 from eBay before? If you did, did you get what you wanted? and did it work like it should?

    Common anode is very common and you have more options with driving them such as NPN etc. Don't ever expect 5 star service or even 3 star service from ebay and as long as you don't stick your neck out too far ($5 is not even one of your whiskers) then you won't be disappointed or burned.
    Isn't it way too much bother to even try and sort it out, I mean you ended up with the better displays at a whopping 10c each, I would've been inclined to use them and since you were even trying to Spin a free centipede as an RTC I would have thought you would have made the most of your goldmine.

    I've never really bought chips themselves from ebay (okay, some MP3 chips then), I wouldn't trust it plus I just order from Digikey and the like. Forgive me but I always find it hard to relate to these situations as I have hundreds of parts drawers full of components, walls abd boxes full of components and boxes full of smd tape and reels, all of which I mainly use for prototyping and small quantity production. If postage and freight from Oz weren't such a hassle and a rip-off I'd just send you handfuls of parts. China seems to enjoy "free postage" at the expense of other UPU nations it seems.
  • TCTC Posts: 1,019
    edited 2014-03-20 07:45
    Isn't it way too much bother to even try and sort it out, I mean you ended up with the better displays at a whopping 10c each, I would've been inclined to use them and since you were even trying to Spin a free centipede as an RTC I would have thought you would have made the most of your goldmine.

    For what I was working on I needed CC Displays. I am using (3) max7219 chips, for each chip I am driving (5) 7-segment displays, and 24 LED's. And the MAX7219 chips had to be on separate boards.
    display.jpg


    But, at least I have (50) displays i can play with, and if I blow a LED, I don't care.
    I've never really bought chips themselves from ebay (okay, some MP3 chips then), I wouldn't trust it plus I just order from Digikey and the like.

    I am in the same boat as you. It is not a matter of money(to an extent), I have heard of horror stories of people getting stuff that are fakes, and that just don't work.
    Forgive me but I always find it hard to relate to these situations as I have hundreds of parts drawers full of components, walls abd boxes full of components and boxes full of smd tape and reels, all of which I mainly use for prototyping and small quantity production. If postage and freight from Oz weren't such a hassle and a rip-off I'd just send you handfuls of parts. China seems to enjoy "free postage" at the expense of other UPU nations it seems.

    Thank you for the offer. I wish I had boxes and boxes of stuff like some of the people on here. But I don't. I have boxes of used parts on boards, from stuff people throw away(tv's, computers, printers, etc..)
    1024 x 577 - 66K
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-03-20 08:19
    TC wrote: »
    For what I was working on I needed CC Displays. I am using (3) max7219 chips, for each chip I am driving (5) 7-segment displays, and 24 LED's. And the MAX7219 chips had to be on separate boards.
    display.jpg


    But, at least I have (50) displays i can play with, and if I blow a LED, I don't care.



    I am in the same boat as you. It is not a matter of money(to an extent), I have heard of horror stories of people getting stuff that are fakes, and that just don't work.



    Thank you for the offer. I wish I had boxes and boxes of stuff like some of the people on here. But I don't. I have boxes of used parts on boards, from stuff people throw away(tv's, computers, printers, etc..)

    There are a lot of fake chips on ebay, it seems they will give you whatever you ask for, as long as you pay they are happy to print a magic number on chips to make it so.

    BTW, i wasn't talking about used parts, I find it better and cheaper in the long run to buy larger quantities and when it comes to smd passives it is very easy to end up with scores of reels of these too of. I think even in resnets alone I have about 20 reels or more of different values there. Could I use 100,000 resnets? Maybe not but I like the convenience of it and it doesn't hold up early production either and it works out to 0.1 of a cent/"resistor".. There's even boxes full of new boxes of through-hole resistors that I would hardly ever use.
Sign In or Register to comment.