Shop OBEX P1 Docs P2 Docs Learn Events
Touchscreen modules, Prop pins and memory size. — Parallax Forums

Touchscreen modules, Prop pins and memory size.

eagletalontimeagletalontim Posts: 1,399
edited 2012-02-06 23:17 in Propeller 1
Hello all once again! I have been searching for over a month now on a display to go with my product with no luck :( I am thinking having a touch screen would be great, but I have not been able to find a touch screen with an enclosure yet that I can afford to use with my product.

A few questions I have :

Has anyone used a touchscreen with the prop that is less than $100 that comes with an enclosure? If so, where can I find it?

When using a touchscreen display, what is the best communication method for the display to the chip that does not use more than 10 pins from the prop?

If I do go with a touchscreen module, how much memory would be used up to run the display and possibly show pre-programmed icons? I would hate to run out of space in the eeprom just to run the display.


Thanks for any help! I am tired of being stuck on this part of my R&D! Having a custom enclosure built for a display is very expensive and taking a premade box and modifying it to fit the display is time consuming and not very professional looking unless using precision tools which I don't have.

Comments

  • Dr_AculaDr_Acula Posts: 5,484
    edited 2012-01-31 20:08
    I can't help with the enclosure but there are others here with all sorts of expertise who may be able to help.

    Re the pins, you name the number of pins and that will dictate the speed. You can do this with no extra pins, and put an I2C expander on the eeprom bus. Or 3 pins and use an SPI I/O expander. Or 3 pins for an HC595 serial to parallel.

    I've used an 11 pin solution which takes about 1 second to refresh a screen. Those 11 pins are also shared with a 512k ram chip for faster throughput.

    An SD card will give you far more space than the eeprom and it is more convenient to transfer data to and from.

    I've got a new board design that uses 19 propeller pins for direct access to the display but shares these with the external memory, and the touch part of the touch screen and the SD card and a few spare SPI ports as well.

    So it is a tradeoff between speed and pins. Many solutions though.
  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-01-31 20:35
    So basically, the SD card acts as ram for the display?

    The enclosure is kind of important, but if I do have to make one myself from a premade box, I guess I will have to spend a little more time per product. The biggest question is what touchscreen to go with. I want to stay under or at 4" to keep the size small enough to be able to be placed anywhere.

    I have no idea how to write the display code, but I will have to learn if this is the way I go. There are quite a few things I have in mind for what I want it to do, but getting the right display is the first step. Feedback on good touchscreens would be great :)

    Most touch screen modules have a very thin ribbon cable that would connected to the circuit board. Since my display will act like a monitor for my product, the display will be up to 4 feet away so having a communication option like i2c, rs232, or spi built into the screen would be great since I will not have to design another PCB to connect to the display. The cost is what is killing me! I have found iPod touchscreens for $15 to $30 but I don't know if they would even work with the Prop or where to find a spec sheet on them.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2012-01-31 21:05
    Yes those thin ribbon cable connections put me off touchscreens for a while. If you haven't seen this thread already http://forums.parallax.com/showthread.php?137266-Propeller-GUI-touchscreen-and-full-color-display and post #28 has some links to displays with much easier to use 40 pin headers.

    Not sure about the distance - if you want a decent refresh speed the clock speed is up in the megahertz which means best to keep these speeds on a single board. Many options using two propellers and have one dedicated to driving the display and with its own serial link, and the other does the processing.

    External ram could be handy. For instance if you store a font on an SD card, every time you print a letter on the screen you have to open the font file, read in all the data till you get to that letter, then close the file etc.

    On the other hand, reading icons and pictures off an SD card directly works fine.

    In a way, splitting the project into two propellers linked by RS232 might simplify things because there probably is enough ram on a propeller chip to store the pixels for one or two fonts. So then your display propeller could connect 21 pins to the display, 3 for touchscreen, 3 for SD card and reuse the programming pins for the serial link. That is a super simple circuit because it would just be a few pullup resistors. Actually, not even that, because the display already has an SD socket on the back with its own pullups.

    Then you can abstract the commands to something you can send down an RS232 link - move the cursor to x,y. Print a string. Print a number. Display file "myicon" at x,y. Read the touchscreen. I've got those sorts of things working in spin already.

    I can feel a super simple board design coming on. Maybe an addon for the Gadget Gangster? A 40 pin socket for the display and a max3232 and a D9 socket.
  • RaymanRayman Posts: 14,845
    edited 2012-02-01 10:34
    eagletalontim,
    Mountain King Tech sells enclosures for our PTP and PSB boards. http://www.mountainkingtech.com/

    He's also working on one for PTP2.
  • jvrproductionsjvrproductions Posts: 61
    edited 2012-02-01 17:42
    Eagletalontim, I Am pretty new on all this but i have about 2 weeks using the PtP2 from http://www.rayslogic.com/ and work great for my. I also get so far verry good support from Rayman
  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-02-01 18:16
    I am looking into that one from ray's logic. It seems pretty reasonably priced. Mountkingtech sells enclosures for it, but the dimensions are a little big for that display. I wonder if they could be cut down a little to fit the screen a little better to make it more discrete.
  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-02-02 20:13
    Since the display from rayslogic does not have stand alone and SD card capabilities like what I am needing, I am leaning more to building my own to use with my product. The only problem is, I don't know where to begin! I can find display's pretty cheap, but I don't know what can be connected to the prop in the easiest ways possible.

    I have read the thread Dr_Acula posted about and WOW....That is amazing! His design is sort of what I am interested in without all the slide actions and what not's. Since the touchscreen needs to be within a few inches of the processor, I would have to build my own board that would use the Prop as the main processor. If there were a very simple way to wire up a touchscreen to the prop, I would want to go that route to keep the cost as low as possible. This touchscreen idea has already been priced over $70 extra for my project. The lower the better.

    Features I would like to have would be :

    SD card to handle the font file(s), background image, and icon images. Customers can upload their own background image as long as it is a specific size. I have a web based script I wrote that can crop, resize, and output a .jpg image from any picture.
    Small enough touch screen to have ease of access to different functions and readability, as well as an enclosure that fits the screen. The circuit board can be made to match the enclosure.
    RS232 or I2C communication between the screen circuit and the main brain of the product.

    Questions I have..

    Can the prop interpret any JPG image from the SD card and display it on the screen?
    A standard windows font file cannot be used to display characters on the screen without modification?
    Since to display characters on a screen involve opening the file, finding the character, closing the file and outputting it to the screen, how fast could I update the values on the screen that will be show all the time? I am currently refreshing every 100ms with my 2x16 display.
    Has anyone wired up a touch screen directly to the prop without using latches? If I do it that will, will it be able to display color images on the screen? If so, where could I find some information on doing it that way?

    Sorry for all the questions! I just want to learn from people who have way more experience than me :)
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2012-02-02 23:05
    I'm fairly new to this as well but to try to answer the questions:
    The simplest way to wire up the display is 20 pins directly from the propeller. Then 4 for the SD card and 4 for the touchscreen. Not many prop pins left there but that will work, though maybe not everything at the same time. Good for testing things one at a time.

    I think it will work better with an external memory but more experiments in the next few days might answer that.

    A font file is ?20k and if you read from a ram you can get the data out with random access. Thousands of characters per second. From an SD card, on average you might need to read 10k to get to the relevant character. Kye's SD driver is 241kb/sec so ? 24 characters per second. Maybe a bit tedious for a screen refresh of text - I don't know.

    No it can't do a .jpg image directly. Works best with .raw images which you can output from any graphics editor. .raw is uncompressed with 3 bytes per pixel - RGB. Load a .jpg into paintshop and save as a .raw. Copy to the sd card. Takes about 30 seconds.

    Usually there are a few more steps involving cropping and then resampling down to 320x240. Sometimes a rotate as well. paintshop and other graphics programs can do all this very easily.

    Any windows font can be converted to a format that the display works best with. It is a two step process but you only need to do it once per font. I can convert a font in about 2-3 minutes so you name the font... Essentially the process converts a "true type" font into a "bitmap font". Windows fonts have things like "draw a circle of this radius" so you have to render them somehow. But the renderer can make that any size so only one file per font. Bitmap fonts need a separate file for every size you want, plus separate files for italic, and bold. Plenty of room on a modern SD card though.
    If I do it that will, will it be able to display color images on the screen?
    Yes.

    Also the difference between latches and no latches is about 4 lines of spin code.

    Sorry to be a bit vague - this is very cutting edge so things are changing rapidly.
  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-02-03 17:09
    I think the SD card method may be ok for me now and when the product gets more popular, I can afford to upgrade certain things which may bring in repeat customers. I do like the idea of a simple connection directly to the screen to control it.

    And a few more questions....
    Can any touch screen display connect with only 20 pins or only certain ones?
    Would the speed of the Prop running at 80Mhz be a problem for the running the screen and / or RS232 or IC2 communication between the main brain running at 80Mhz and the screen circuit?
    Since the prop screen circuit will be connected to the prop, display, touchscreen, and the SD card, would I need to have it's own power supply on the board running the circuit or could I send 5v power from the main brain, then have a 3.3v regulator on the screen controller?
  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-02-03 21:18
    I am about ready to pull my hair out trying to find a touch screen and an enclosure to fit it. I have even tried finding a Digital Photo frame without the electronics. I guess there are no US based manufactures or resellers for them. I don't want to wait 10 to 30 days for a plastic enclosure. At this point, I am ready to buy a 2.4" digital photo frame and tear it apart to modify for my product (hack job, not professional). It is almost exactly what I need.
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-02-03 22:09
    That's not actually a bad idea, but you need to get a high-resolution one (800x480 or higher) because most of the low-resolution ones have analog input to the LCD which requires changing the polarity of the drive signal every frame, or line, or something like that. Either way, it's not fun.

    You may be able to find a display with a video input.

    The Dingoo A320 has a Serial port that's easy to access and an impressive SDK. It's not touchscreen, but it does have a D-pad and A/B/L/R buttons. With smart UI design, it'll be easier to use than a touchscreen would be.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2012-02-04 17:34
    I feel your frustration!

    Putting things in boxes is not my strong point. I worked on bionic ears once and all the engineers never had cases on their computers.

    Re a touchscreen, if you use one of those then you don't really need an enclosure - just a neat square cutout in a box. Otherwise you can't touch the screen, right?

    There must be people around who can make a neat square hole in a plastic box. I did some research and found a number of online sellers who make front panels to order.

    I wonder, since these touchpanels are meant to go in phones, whether you can get the empty shell of a phone case?

    Rayman (above) knows more about this than me.
    Can any touch screen display connect with only 20 pins or only certain ones?
    Would the speed of the Prop running at 80Mhz be a problem for the running the screen and / or RS232 or IC2 communication between the main brain running at 80Mhz and the screen circuit?
    Since the prop screen circuit will be connected to the prop, display, touchscreen, and the SD card, would I need to have it's own power supply on the board running the circuit or could I send 5v power from the main brain, then have a 3.3v regulator on the screen controller?

    I'll answer that in a roundabout way.

    http://forums.parallax.com/showthread.php?137706-Anyone-got-a-Spin-compiler-writtin-in-C-or-Spin

    The screen refresh font data is coming out of ram rather than off the sd card, and you can see it is a little slow, so I think that answers the question about running it without a ram chip.

    The 80Mhz speed of the prop is not a problem. In general terms there are two broad options. The first are displays where the propeller generates the signal in real time. This includes TV and VGA and for these displays the propeller needs to be close to the display. The other broad category are 'smart' displays where the refresh is done inside the display. This includes 20x4 and 16x2 LCDs and these touchscreens. These have more pins but you can clock those pins slow if you like so the wires can be longer. Clock them once a second if you want.

    Re RS232 and I2C and other formats, it depends what data you are sending. If it is just text, yes easily fast enough. Graphics takes more data, eg a character "H" is one byte, but if you sent the pixels it might be something like 17x17x2 bytes (for a reasonable size font).

    You probably won't need local power supplies. If you have 3V, you can run that for metres, tens of metres even.

    In some ways I wonder if graphical touchscreens are a bit too new and the technology is not ready enough? Maybe go for text only, which the propeller is really good at. I started off using the Pocketterm http://www.retrothing.com/2009/07/the-briel-pocketerm.html which uses a VGA display and a propeller chip and it works with standard RS232. Not as pretty as a touchscreen, but it does work right out of the box.
  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-02-04 21:26
    I have tried matching a touch screen with a premade plastic enclosure without a cutout which seems to be almost impossible. Something that is 3" x 3" will almost always be over or at 1" thick or more. Finding the standoffs in the right place for a specific touch screen is impossible on a premade box. I have some 2 part plastic mixture that would work but..... Once hardened, it is not strong enough to withstand much abuse. It scratches very easily and chips pretty easy too. Plus, it is an off white color. I would want a black case.

    The data I want to show on the screen will be sent via a byte or a long sent as 2 bytes. They would refresh a line on the screen in specific locations. Still am researching that one. The menu setup, images, and fonts will all be built into the prop and SD card that controls the screen if they will fit into the program.

    I was thinking of doing text only, but I want to go all out since I cannot locate a small 2x16 or 4x20 display with at least 3 buttons enclosed in its own case. Cutting a square in a box should not be that hard to do for a touch screen. A template and a dremel is all I need. I have also been wanting to get a 2' x 2' CNC mill machine....that is later in the budget though.

    Could someone recommend a 2.5" touchscreen that is trustworthy to purchase? I don't want what happened to the first iPhone to happen to my display. The touch screen needs to last. There are a few different types of touch screens and I am not sure which one would be best for my application since it is for an automotive environment with different temperature ranges and lighting.
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-02-06 15:30
    Did you look at the Dingoo? They're widely available, and it's a complete system in a nice case. Should be easy enough to hack, as I've come across many guides to do so.
  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-02-06 19:02
    That is a neat product, but at $109 per unit, I can't afford to use it as just the display with a few buttons. I have found a site that has some premade boxes that may fit a screen it it after making a cutout. I will have to order one and see how it works out.

    Before I can order a box, I need to find a touchscreen display that is suitable for my application since it is in an automotive environment. As stated in my last post, could someone recommend a 2.5" touchscreen that is trustworthy to purchase as my primary display? I like the palm pilot screens, but am not sure about the reliability of them or what type of touchscreen they are verses what I should use in an automotive environment.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2012-02-06 19:27
    The touch screen needs to last.

    *tongue firmly planted in cheek* No No, you don't want it to last. You want to design inbuilt obsolescence! Why do you think you can't open an iphone to replace the battery?

    Seriously though, I suspect this is going to take a bit of money, time and research. What is better in a car - buttons or a touchscreen? And regarding visibility - certainly an OLED is far more visible than an LCD. But then again, the reversing camera in my new car is LCD.

    I can't make any suggestions about what is the best sort of display.

    But I can say that I have been using displays from these guys http://stores.ebay.com/Ego-China-Electronics and I like the touchscreen ones that have 40 pins headers as they are much easier to interface to. The 2.4" one is $16.80. Scroll through all the displays they have though as some (like 2.5") do not have the 40 pin header. They sell adapter PCBs for connecting to other displays.

    How is your box going to be mounted in the car?
  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-02-06 19:45
    I do want it to be a reliable product, but if the touchscreen fails, I could sell just the screen itself for the DIYers or the entire display as a "plug and play" fix. The touch part is what I am confused about. There are capacitive touch, resistive touch and more. I don't know which one is better. My phone has a touchscreen and it is difficult to select certain things on the screen and I have to push harder to activate the touch. On an iPhone though, the screen is really easy to activate the touch. Which type of touch is better and easier to use?

    I am not sure about the mounting in the car since everyone will like theirs set up different. Mine will probably go above the shifter which will be velcro'ed down to prevent it from sliding everywhere and if I need to remove it, I can simply pull it off of the velcro. That is why I am hoping to find a small touchscreen with a small case so it does not get in the way of anything else and does not look bulky.
  • pedwardpedward Posts: 1,642
    edited 2012-02-06 19:54
    Resistive touchscreens are the simpler and less expensive route. You can use a gloved hand or stylus in addition to your finger. A capacitive touchscreen requires more processing and only works with special stylii or special gloves, or your finger. The quality of the touchscreen depends on resolution and the UI. If you make the onscreen elements too close together, you will have problems. The accuracy of the capacitive touchscreen also depends on thickness. Samsung has very accurate capacitive screens with their OLED technology, a claimed 5x more accurate.

    In your case, resistive will be cheaper and probably work better for your audience. The resistive units also add a little haze to the screen that capacitive units don't have.
  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-02-06 20:07
    Ok, thanks for that information! I will see what I can find in resistive touchscreens.

    The Ebay store above has some nice screens, but the problem i...they are located in China. If I am slammed with orders and need to order more right away, I don't want to have to wait 3 to 6 weeks to get the parts in. I have had times with my current version where I get 15+ orders at once. I usually only keep enough parts for 10 since profit and demand is not really there to order more than that. I have been looking for an investor to help get this new version off the ground and into development, but I need a working prototype before I go that far. I hope to make the first order enough to build 50 to 100 units. With a screen that is the highest cost except for the PCB boards, I need to try and get the least expensive but the easiest to use. Without having an all in one, ready to use as a display, with SD card capabilities, I have to design my own. Doing so will help keep the cost lower since it is my labor I put into it.
  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-02-06 20:16
    Just found this.... It has the SD card slot and a 40 pin header.

    http://iteadstudio.com/store/index.php?main_page=product_info&products_id=55

    That looks to be something I could use :) I could use a prop as the controller for the screen and do just about everything I am looking for from what I am reading in the specs. Any comments on that screen?
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-02-06 20:23
    That is a neat product, but at $109 per unit, I can't afford to use it as just the display with a few buttons.
    Where do you get $109? I see <$75.
  • pedwardpedward Posts: 1,642
    edited 2012-02-06 20:24
    LOL, this is the same display, more or less, Dr_Acula has been pushing since the start of this thread.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2012-02-06 20:25
    LOL, this is the same display, more or less, Dr_Acula has been pushing since the start of this thread.

    *chuckle*
  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-02-06 20:32
    Hmmm. I must have been on the wrong site when I saw $109 for the Dingoo A320. I did find another that was $73 something but anything over $50 is a bit high for me right now due to my low budget :(

    I did not know that was the display he was using!?!? If I would have known that, I probably would have ordered one by now. I think I will order one or 2 of those for testing as long as it will work with the prop. From all the posts I have read, just about any touchscreen will work...just finding what pins go to what and how to use them is my problem.


    EDIT : Should I get the 8 bit or 16 bit setup? It would be 16 if I wanted a better quality image correct?
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2012-02-06 20:36
    8 vs 16 bit are the same hardware. You define the setup with a few bytes in the software startup sequence. So the hardware is the same.

    That 40 pin layout seems to be some sort of standard - lots of different manufacturers are using it. Means that if a display dies or the screen gets cracked, you can plug in a new one.
  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-02-06 20:38
    Ok, thank you very much on that information. I have 2 on order now and will be waiting for them to come in! More questions to come.... :p
  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-02-06 21:20
    One more question... Can I use the Prop Demo Board with the breadboard on it to use for testing / programming the prop to control the screen? I need another development board for the screen since it is a different circuit than the main unit.

    EDIT : I don't think it will work since there are only 8 pins usable on the breadboard. I definitely cannot afford the Pro development board! Any other development board for the prop that will work with the 40 pin header?
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-02-06 23:17
    I'd get the proto board USB and a socket for the LCD. Solder up the circuits you need and plug the LCD in.

    Most of the cost of the professional development board is in the solderless breadboard, so if you have one already, just buy a DIP40 propeller and start there.

    To attach one of the LCDs to a breadboard, go to digikey and get a DIP-style ribbon cable assembly, cut it in half, and connect IDE connectors to the free ends. The easiest way to connect the IDC connector is with a vice. Begin to slide the back of the connector into the front, slide the ribbon cable into it so it's flush, then press it in a vice to compress the whole thing until both ends click and latch.
Sign In or Register to comment.