Shop OBEX P1 Docs P2 Docs Learn Events
External logic and the Prop — Parallax Forums

External logic and the Prop

Buck RogersBuck Rogers Posts: 2,191
edited 2011-09-21 00:27 in Propeller 1

Hello!
I have an interesting problem. Having just discovered the Prop (or rather actually obtained a Prop board) I now am sorting out how to have the unit communicate with external digital logic.

For example for the basic stamp, it was simply easy: Just connect the logic points to the appropriate stamp pins. And from there while programming, tell the stamp what pin does what, is that pin an input, then okay, its an input, and the output of the gate is connected there.

The same (but reversed in function) is true for the input or inputs of that gate.

This of course presupposes that the logic is running at the same VCC levels as the host. For the stamp it would accept 5v logic levels and work out of the box as it were.

The Prop on the otherhand is a 3.3v device, and would work perfectly with CMOS logic levels. The CD4000 series is all rated for 3v up to 18v, but rarely gets that high.

Does the crew here have any ideas on how to proceed further?

Incidentally I also have here the Nokia (knockoff) breakout board from Sparkfun. That according to their site is indeed a 3.3v device.

On the page for the actual LCD I found plenty of examples, but nothing for the Prop. Also an example for the basic stamp. I decided against it, when I found out from Parallax that the device is considered to be difficult to program, even by them.

The ultimate goal is to have the LCD screen display data from the logic in a variety of styles.

Comments

  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-09-18 19:11
    In addition to the 4000 range, the propeller will also work with the entire 74HC range as these can be powered from 3.3V.

    Not the 74HCT range though.

    Some things are 3.3V standard, eg SD cards so they are easier with the prop than with old-skool 5V logic.

    For 3V to 5V you can use 74HC logic gates and run the logic from 5V as 3.3V is considered a logic "high".

    For bidirectional 3.3V to 5V you can use a 2.7k resistor (the theory behind this is complicated and there are pages of discussions on this forum about this but in the end, it is just a resistor).

    There are discussions about running LCD displays on the forum. They may work fine anyway as you can power the display from 5V and again, 3.3V is considered a logic high by a lot of other external devices.

    Or you can add a buffer that you power from 5V, eg a 74HC244.

    Many options and many solutions and the bottom line is you can interface anything to the propeller that you can to the stamp.

    Keep the questions coming!
  • RonPRonP Posts: 384
    edited 2011-09-18 19:14
    Buck Rogers, check out this thread.

    -Ron
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-09-18 19:18
    I was reading the comments on Nokia knockoff page yesterday. I have two different breakout boards from Sparkfun. Apparently getting them to work depends on which screen, of several, you happen to have.

    After reading the all the headaches so many people have had with the Nokia boards, I dug out one of my 4.3" LCDs with touchscreens from Rayman.

    As far as connecting digital logic to the Propeller, it's a lot like the Basic Stamp. The syntax is different but you're still setting pins high or low or monitoring pins set as inputs. It's all in the manual and in the Propeller Education Kit (both can be found from the Prop Tool's help menu).

    Duane
  • Buck RogersBuck Rogers Posts: 2,191
    edited 2011-09-18 19:28
    Duane Degn wrote: »
    I was reading the comments on Nokia knockoff page yesterday. I have two different breakout boards from Sparkfun. Apparently getting them to work depends on which screen, of several, you happen to have.

    After reading the all the headaches so many people have had with the Nokia boards, I dug out one of my 4.3" LCDs with touchscreens from Rayman.

    As far as connecting digital logic to the Propeller, it's a lot like the Basic Stamp. The syntax is different but you're still setting pins high or low or monitoring pins set as inputs. It's all in the manual and in the Propeller Education Kit (both can be found from the Prop Tool's help menu).

    Duane

    Hello!
    Excellent point made here. The one in question is the LCD-08600 board. It indeed is the one that prompted the comments directly from Sparkfun.

    Also which
    Nokia knockoff
    are you thinking of? Or which ones.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2011-09-18 19:36
    Dr_Acula wrote: »
    In addition to the 4000 range, the propeller will also work with the entire 74HC range as these can be powered from 3.3V.

    Not the 74HCT range though.

    Some things are 3.3V standard, eg SD cards so they are easier with the prop than with old-skool 5V logic.

    For 3V to 5V you can use 74HC logic gates and run the logic from 5V as 3.3V is considered a logic "high".

    For bidirectional 3.3V to 5V you can use a 2.7k resistor (the theory behind this is complicated and there are pages of discussions on this forum about this but in the end, it is just a resistor).

    There are discussions about running LCD displays on the forum. They may work fine anyway as you can power the display from 5V and again, 3.3V is considered a logic high by a lot of other external devices.

    Or you can add a buffer that you power from 5V, eg a 74HC244.

    Many options and many solutions and the bottom line is you can interface anything to the propeller that you can to the stamp.

    Keep the questions coming!

    Don't you mean 74HCT is compatible with the Propeller? 74HCT has a Vih of 2V or so rather than 0.7Vdd of a 74HC which is out of reach if driven from a Prop.

    @Buck
    Most character LCDs have TTL logic levels, that is they accept anything above 2V as a logic high so there is no need to buffer these. Anyway, if you use the technique of not reading the LCD (tie R/W high) and simply insert a small delay you can then interface directly with 5V LCD modules.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-09-18 19:48
    It's so easy to interface a PS/2 keyboard and TV display with the Prop, that you might start with that. FemtoBasic is a Basic interpreter (in the OBEX) that allows control of individual I/O pins and groups of I/O pins much like the Stamps and you can write programs directly on the Propeller with it. There's a version (DongleBasic) that uses the programming serial port for its console, but it's much more fun to use the Prop as a stand-alone computer for this sort of experimentation.

    I've used the Prop several times as the controller for a project and used FemtoBasic for debugging the hardware.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-09-18 19:50
    Also which are you thinking of? Or which ones.

    I have a board very similar to the LCD-08600. It must be an older version of the board.

    I also have an even older board which isn't listed in the "retired" items. The older board doesn't have the buttons or the RGB LED.

    From what I've read, the screens that come with LCD-08600 aren't necessarily all the same. It looks like the driver chip can vary.

    Duane
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-09-18 19:56
    @Peter, yes character LCDs ought to work with no buffering.

    Re HC vs HCT http://en.wikipedia.org/wiki/Logic_family scroll down and there is this description which clarifies it a bit further
    HC logic

    Because of the incompatibility of the CD4000 series of chips with the previous TTL family, a new standard emerged which combined the best of the TTL family with the advantages of the CD4000 family. It was known as the 74HC (High-performance silicon gate) family of devices and used the pinout of the 74LS family with an improved version of CMOS technology inside the chip. It could be used both with logic devices which used 3.3V power supplies (and thus 3.3V logic levels), and with devices that used 5V power supplies and TTL logic levels.
    [edit]
    The CMOS–TTL logic level problem

    Interconnecting any two logic families often required special techniques such as additional pull-up resistors, or purpose-built interface circuits, since the logic families may use different voltage levels to represent 1 and 0 states, and may have other interface requirements only met within the logic family.

    TTL logic levels are different from those of CMOS – generally a TTL output does not rise high enough to be reliably recognized as a logic 1 by a CMOS input. This problem was solved by the invention of the 74HCT family of devices that uses CMOS technology but TTL input logic levels. These devices only work with a 5V power supply. They form a replacement for TTL, although HCT is slower than original TTL (HC logic has about the same speed as original TTL).

    HCT can only run from 5V (and it is a bit confusing when you see spec sheets that combine HC and HCT on the same datasheet) so (for an output) you could use HC and run it at 3.3V or HC and run the HC at 5V or run HCT at 5V but you can't run HCT at 3.3V.

    Having said that, if you were running HC at 5V I have a feeling that the logic high is very close to 3.3V and so to be sure, I have tended to use HC powered at 3.3V and HCT powered at 5V.

    Hmm - rereading that, it might still be a bit confusing. Sorry.

    5V logic inputs to the propeller are easier - just use the series resistor.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2011-09-18 21:00
    Dr_Acula wrote: »
    <snip>
    HCT can only run from 5V (and it is a bit confusing when you see spec sheets that combine HC and HCT on the same datasheet) so (for an output) you could use HC and run it at 3.3V or HC and run the HC at 5V or run HCT at 5V but you can't run HCT at 3.3V.
    <snip

    The reason the operating range for 74HCT is quoted as around 5V is simply for TTL interfacing, nothing else. 74HCT shares the same internal structure as 74HC, only the input stage is different. If you run 74HCT at 3.3V you will find that the Vih is reduced but not really anything different when compared to the Prop's Vih.
  • Buck RogersBuck Rogers Posts: 2,191
    edited 2011-09-18 21:11
    Duane Degn wrote: »
    I have a board very similar to the LCD-08600. It must be an older version of the board.

    I also have an even older board which isn't listed in the "retired" items. The older board doesn't have the buttons or the RGB LED.

    From what I've read, the screens that come with LCD-08600 aren't necessarily all the same. It looks like the driver chip can vary.

    Duane

    Hello!
    I see. Are your boards part of the Sparkfun family? I mean besides the one I've mentioned here that is. According them, there is indeed one. (One older that is.) The board itself was originally designed for a different product, which sadly was never sold. The board was however, they also sell the LCD separately, along with the connector. I bought the board several years earlier, since it would be easier (I thought) to use, then working out how the heck to make up the LCD and connector, and thence wire the connector to something.

    Can you post photos of your boards?
  • Buck RogersBuck Rogers Posts: 2,191
    edited 2011-09-18 21:17
    Don't you mean 74HCT is compatible with the Propeller? 74HCT has a Vih of 2V or so rather than 0.7Vdd of a 74HC which is out of reach if driven from a Prop.

    @Buck
    Most character LCDs have TTL logic levels, that is they accept anything above 2V as a logic high so there is no need to buffer these. Anyway, if you use the technique of not reading the LCD (tie R/W high) and simply insert a small delay you can then interface directly with 5V LCD modules.

    Hello!
    Actually Peter the LCD in mind is this thing: http://www.sparkfun.com/products/8600 I know what you're thinking about the regular character display ones, I've got one of them here, its not the one from Parallax, its a pull from something else entirely.

    I've gotten it to work with Sparkfun's Serial Backpack for LCD units http://www.sparkfun.com/products/258 this activity was both with the Basic Stamp, and with several other methods.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-09-18 21:26
    Actually Peter the LCD in mind is this thing: http://www.sparkfun.com/products/8600 I know what you're thinking about the regular character display ones, I've got one of them here, its not the one from Parallax, its a pull from something else entirely.

    The specs on that display say it can be run from 3.3V so just connect straight to the propeller?
  • Buck RogersBuck Rogers Posts: 2,191
    edited 2011-09-18 21:27
    Mike Green wrote: »
    It's so easy to interface a PS/2 keyboard and TV display with the Prop, that you might start with that. FemtoBasic is a Basic interpreter (in the OBEX) that allows control of individual I/O pins and groups of I/O pins much like the Stamps and you can write programs directly on the Propeller with it. There's a version (DongleBasic) that uses the programming serial port for its console, but it's much more fun to use the Prop as a stand-alone computer for this sort of experimentation.

    I've used the Prop several times as the controller for a project and used FemtoBasic for debugging the hardware.

    Hello!
    One of the reasons why I bought the unit, via the booth at the Maker Faire on Sunday, (Maker Faire held in Corona Queens NY at the Hall of Science grounds and buildings.) was indeed your FemtoBasic, and even our discussions a while ago concerning the YBOX gizmo.

    I talked to the folks there about that and they are convinced that its better off being made and managed by the current firm.

    The other reasons were regarding that dratted LCD display http://www.sparkfun.com/products/8600 I figured after repeatedly studying PBASIC code for it, and even that A******** one that it would be much easier to follow the suggestions of the people here who suggested that the Prop would be a better fit for it.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-09-19 00:29
    Can you post photos of your boards?

    Here's a picture of my older board.
    NokiaOld110918a.png


    And the back of the same board.

    NokiaOld110918c.png


    There's a date on the back of the board. December 13, 1905. I had forgotten about SparkFun's old logo. I think I like the flame better than this stylized "S".

    Here's the newer board (but still older than the one they currently sell).

    Nokia110918a.png


    This board had the voltage booster on the back.

    Nokia110918c.png


    I'm reluctant to try to write a driver to use these displays with a Propeller since I doubt a driver that works with either of these displays will also work with the displays SparkFun currently sells.

    Duane
    398 x 483 - 332K
    784 x 510 - 738K
    403 x 482 - 366K
    901 x 493 - 777K
    578 x 364 - 367K
    554 x 343 - 339K
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-09-19 02:24
    That is a nice looking display. It would be cool if we could get it working with the prop. I only had a brief look at the pins, but it has a clock and a data pin so it could be I2C or SPI. Both of which have objects already written for the prop.

    So it would be a matter of decoding the protocol. I took a look at the code but it referenced an object called "lcd" and I couldn't find the code for that. It looks like it is written in C and we have C working on the prop.

    Unless someone has already written the code...
  • Buck RogersBuck Rogers Posts: 2,191
    edited 2011-09-19 19:39
    Duane Degn wrote: »
    Here's a picture of my older board.
    NokiaOld110918a.png


    And the back of the same board.

    NokiaOld110918c.png


    There's a date on the back of the board. December 13, 1905. I had forgotten about SparkFun's old logo. I think I like the flame better than this stylized "S".

    Here's the newer board (but still older than the one they currently sell).

    Nokia110918a.png


    This board had the voltage booster on the back.

    Nokia110918c.png


    I'm reluctant to try to write a driver to use these displays with a Propeller since I doubt a driver that works with either of these displays will also work with the displays SparkFun currently sells.

    Duane

    Hello!
    This tells me that there are indeed older boards out there for that LCD. The posts on the site for the thing also talk about it, but proof was needed.

    Okay good.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-09-21 00:27
    Buck,

    Rayman has information about the color Nokia display on his website. Rayman has a bunch of other great information on his site. He also sells lots of cool hardware. (I just purchased a couple more of his 4.3" LCD breakout boards yesterday.)

    The 3.5" display he sells is also really nice. I have one of his Propeller Touchscreen Platforms that I use to control lab equipment, robots (and sprinklers).

    I just realized you can purchase one of Rayman's breakout boards for his 4.3" LCD touchscreen (he includes the screen for free) for less than the Nokia display breakout board. Crazy!

    Duane
Sign In or Register to comment.