Touchscreen modules, Prop pins and memory size.
eagletalontim
Posts: 1,399
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.
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
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.
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.
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.
Mountain King Tech sells enclosures for our PTP and PSB boards. http://www.mountainkingtech.com/
He's also working on one for PTP2.
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
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.
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.
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?
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.
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.
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.
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.
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.
*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?
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.
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.
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.
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?
*chuckle*
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?
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.
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?
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.