Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC 24F Voltage Rgulator and Touch Screen

Status
Not open for further replies.

Micro9900

New Member
Hey guys, I'm starting a new project and I started looking into a 24F. Here is the model I have narrowed down:

PIC24FJ64GB002-I/SP-ND

I was wondering if you guys have a good voltage regulator in mind. I plan to power this via USB (which I already have done with the 18F4550). So, the voltage regulator would have to take in appox. 5V and step it down values between 2 V to 3.6 V.

In addition, I am looking into a touch screen. Specifically, I am looking at purchasing this model:

NHD-2.4-240320SF-CTXI#-T1

From my understanding it would be easier to go program it using Microchip's C30 compiler since it has a graphics library.

The overall project involves USB communication (which is why I have selected a 24F microcontroller with a USB controller) to a PC that can accept commands from the touchscreen (can be used as a mouse) or the PC can draw a user selected image to the touch screen. So, I want to know how feasible any of the parts of this project is going to be. I have the whole summer to work on this and I want try to get as far as possible.

So my questions are as follows:
_________________________
1. What voltage regulator would you recommend for the 24F I have selected (one that accepts 5V as an input and output any where between 2 to 3.6V)?

2. Is the touchscreen and microcontroller that I am going with feasible? (Is it practical to do a project with this?)

3. Should I be looking into additional hardware components or any thing else required with the touch screen?

As always, thank you for your time, assistance, and responses regarding this project.
 
Last edited:
Virtually any linear regulator will work fine for 5 to 2-3.6 volts, the voltage drop is so low the efficiency loss compared to a switching supply isn't really enough to warrant the extra cost and complexity. Just as an example, the efficiency loss from 5 to 3.6 volts is about 72%, most switch modes are only in the 80-85% range... Unless you're trying to string every last watt hour out of a power system it's pointless, regulation and noise characteristics from a linear supply are universally better from a linear supply.

The best sollution for a touch screen is a bit harder to define as the type of graphics you''llbe using are important, if they're just static graphics for interface it's not a problem just about anythingw ill work fine, but you have to start crunching some serious numbers when you're talking about live animation or high speed updated information.

2.4 inches isn't exactly larger either, I have a 3.2" sized cell phone and any kind of detailed touch interface is incredibly difficult to navigate through.

Could you explain the goals of your project a little better like at all ;) You didn't provide even a single bit of information about what you're doing so asking us if the hardware you're going to use is appropriate is... well... a bit odd :p

It would be fine for a simple physical interface without many more buttons on the screen active at any time compared to say a matrix keypad. It would more than likely be useless for any kind of serious active graphics.
 
Well, I previously did a project with the PIC18F4550 and I used a 7805 voltage regulator. I was wondering if you has a specific part in mind (voltage regulator).

The project doesn't involve complex animations or anything like that. Almost all of it will be static. I would like to display a user's image and then if the user pushes a button on the screen he/she can then use the touch screen as a mouse. That's really all I would like to accomplish thus far. I understand that doing a multitude of animations or anything graphics intensive would require a beefier uC such as ARM or PIC 32 variant, so I'm not going to expect it to render the image instantly or everything to be smooth.

So, the project includes two things:
1. Display a user's image uploaded from the PC
2. When a certain area of the screen is pushed the touch screen will act as a mouse and track the user's movement (So, the cursor in windows will follow the user's actions).

All of this would be through USB (USB communication and USB power via the PC using C#). I plan to first get USB working, but I also would like to know if the touch screen is feasible and what parts I should expect to purchase.

So, my main concern is how to interface with the touch screen (linked above) with the given microcontroller. I would like to get the basics out of the way. More specifically, are there any additional compnents that I need in order to communicate from the uC to the touch screen? Additionally, should I even bother with the 24F and stick with the 18F4550? I read that going with a 24F with this particular application in mind would be a better idea, but I'm not a 100%.
 
Last edited:
Thanks for the better description there's a lot more to go with.

Well considering your power source is 5 volts a 7805 won't work :D Pretty sure you knew that though!
The regulator is really irrelevant, ANY fixed linear supply that outputs 2.8V (which is what the LCD display likes) will work, it's the least critical part.

Sounds like the display will be fine, it should be 'ok' for mouse usage, just keep in mind resistance based touch sensors don't handle physical abuse very well so if you intend this to have a high degree of usage you may want to rethink the display, it's listed as having a touch screen life of 100,000 uses for hand writing durability. So figure that into your usage calculation and how long you intend this to last.

. Finding small capacitance touch screens that aren't god awful expensive might be hard though.

That display does use a decent number of I/O lines, it's a 16 bit interface with control/strobe lines not to mention the touch screen connections, but it can be run in 8 bit mode if you're short on I/O lines.

All in all I think it'd work for your needs.
 
Last edited:
Thanks. You bring up an interesting point about the uses (100,000 hand writting usages). That's sort of disappointing and something I completely overlooked. I'll have to try an be careful with the screen. It does support 1mil touches, so I'll probably work on the graphics end of it first (just displaying an image) and if I get to that point either use it as a mouse or probably have buttons to display the time/date/or other information instead.

So, if I understand correctly, there isn't additional hardware required to communicate from the uC to the touch screen (no intermediate device)? And, do you think that the 24F I have selected would be a better route to take over the 18F?
 
Last edited:
The PIC runs at the same voltage range as the display, I don't see any problems, outside of I/O pin usage. For 16bit mode (optimal) you need 16 dedicated I/O lines just for the data bus to the display, plus the control lines and the four lines for the touch screen will have to be attached to ADC lines and read that way.

If you're really not concerned about display update time 8 bit mode will work fine. But the display to MCU interface itself is going to use every pin that chip has, and you won't have much fudge room.
 
Last edited:
Ouch. Well, this would be used only with the touch screen and USB. USB requires two pins for the D+ and D-. I may have to use 8 bit mode like you said. I'm going to be displaying a static image, and maybe display the time, so I don't think it will be top priority. Unfortunately, this is the only uC I could narrow down that can work with a breadboard (DIP). I would try to get a 40pin 24F DIP if I could.

On another note I have selected a linear voltage regulator. Do you think this is acceptable for 5V input and 2.8V output?

MCP1702-2802E/TO-ND
 
Last edited:
Check the current draw of the display under worst case and the chip as well. I think it should be okay. Watch your piece price though.
 
Sorry, I posted the wrong one. Yeah that min. quantity on that one was 600, heh. This one I believe is 1 and can output 250mA max. I think the display uses up to 29mA (back light supply 20mA + power supply 9mA) if I am not mistaken and USB 2.0 can output 500mA.

Here is the correct one that I have selected:

MCP1702-2802E/TO-ND


EDIT: USB info:

"A unit load is defined as 100 mA in USB 2.0, and 150 mA in USB 3.0. A device may draw a maximum of 5 unit loads (500 mA) from a port in USB 2.0; 6 (900 mA) in USB 3.0."

So, it's 500mA for 2.0 and 900mA for 3.0

https://en.wikipedia.org/wiki/Universal_Serial_Bus
 
Last edited:
Please note you have to request anything more than 100ma from the host with protocol conventions to be USB compliant.

Looks okay though. Just watch what you load the MCU with over 100ma, mainly because that's when the regulator will proly start generating some heat.

Software implementation of this is going to be far more complex than the hardware, especially on the USB side.
 
Yeah, I plan to use Microchip's USB framework that they provide and start digging from there. I just wanted to get the trivial stuff out of the way before going crazy with the software. I don't think I'll be going over 100mA given that I'm just using the touch screen and uC. So, I think I'm good. I'll probably order the parts on Monday and probably play around with USB on the 18F first (If I am not mistaken the framework is compatible with the 18F, 24F, and 32F) since I'm more familiar with that uC. Thank you so much for your help, you definitely pointed me in the right direction and I have a bit more confidence with this project.
 
Last edited:
I am glad I could help point you in the right direction. Please post updates on the project as you're able.
 
Sure thing. I'll post a few videos. The first video maybe a simple test of the USB with the 18F and then followed by the 24F. So, I'm going to break the project up into several parts. Anyway, thanks again.

Also, for others who don't know here is a great link to get Microchip's libraries:

**broken link removed**

I'm going to use the USB framework and the graphics library (Note: The graphics library only works with the PIC 24F and 32F).
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top