| Electronics Forum |
Help
Search
Members
Calendar
|
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
![]() ![]() ![]() |
| Chantry |
Posted: July 29, 2010 02:54 pm
|
|
Newbie ![]() ![]() Group: Members+ Posts: 20 Member No.: 30,155 Joined: July 27, 2010 |
Hi,
Quite simply, how difficult is it to send data from a PIC (through some kind of USB / Serial connection" to a PC, and then have that data displayed on the computer screen. Ive heard of this being done, but I have little or no information on the net about how to do it and how much of a pain in the ass it could potentially be. Thanks for any wisdom you can give. P.S My PIC is a 16f628a This post has been edited by Chantry on July 29, 2010 02:57 pm |
| Sparks |
Posted: July 29, 2010 05:34 pm
|
|
Sr. Member ![]() ![]() ![]() ![]() ![]() Group: Trusted Members Posts: 328 Member No.: 750 Joined: April 08, 2004 |
The PIC will have 'UART', which allows data to be sent serially. You can connect this to a chip such as 'MAX232' to convert the UART to RS232, which can connect to the PC.
Alternatively you could use a serial-usb IC, such as the ones FTDI make. The simplest serial-USB chips will create a 'virtual comm port' on the PC, which you can use in the same way as an RS232. |
| srikanthsamaga |
Posted: July 29, 2010 05:46 pm
|
![]() Sr. Member ![]() ![]() ![]() ![]() ![]() Group: Trusted Members Posts: 466 Member No.: 20,004 Joined: November 01, 2008 |
Using USART is simple, USB is complex, and the converter IC is not easily available.
But now many systems dont have serial ports. |
| Sparks |
Posted: July 29, 2010 08:02 pm
|
|
Sr. Member ![]() ![]() ![]() ![]() ![]() Group: Trusted Members Posts: 328 Member No.: 750 Joined: April 08, 2004 |
I have a couple of these things. They arent cheap but I think they are brilliant;
http://uk.farnell.com/ftdi/um232r/evaluati...32rl/dp/1146036 |
| cdstahl |
Posted: July 29, 2010 08:55 pm
|
|
Forum Addict ![]() ![]() ![]() ![]() ![]() ![]() Group: Trusted Members Posts: 917 Member No.: 11,808 Joined: November 04, 2007 |
yes, and from there you will need to have some way to get the info on the screen. for linux, there is minicom. windows probably has something similar. for a programming interface, there probably are a few ways for each OS.
|
| Chantry |
Posted: July 29, 2010 11:03 pm
|
|
Newbie ![]() ![]() Group: Members+ Posts: 20 Member No.: 30,155 Joined: July 27, 2010 |
Thank you for all the info. Serial looks like the best option, ill look into that chip.
|
| MikeGyver |
Posted: July 30, 2010 02:03 am
|
![]() Forum Addict ![]() ![]() ![]() ![]() ![]() ![]() Group: Trusted Members Posts: 628 Member No.: 12,151 Joined: December 05, 2007 |
Do USB. Sparkfun has the latest FTDI chip for $4, or you can get it on a breakoutboard with the very few other components required for like $15. you can then send serial data from the pic to the PC at whatever baud rate through hyperterminal.
|
| VenomBallistics |
Posted: July 30, 2010 04:39 am
|
![]() Forum Addict ++ ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Trusted Members Posts: 1,683 Member No.: 18,557 Joined: September 23, 2008 |
PIC18F2550 .... USB on board
|
| millwood |
Posted: July 30, 2010 04:52 am
|
|
Forum Addict ![]() ![]() ![]() ![]() ![]() ![]() Group: Trusted Members Posts: 701 Member No.: 25,377 Joined: July 26, 2009 |
if you use uart, it can be done quickly: the pc needs hyperterminal, and simply two wires, 1 for Rx and another for ground, on the PC and you are done.
it is easier if the pic has a hardware uart but even if on a pic or any mcu without a hardware uart, you can big bang it quickly. extremely easy would be the right answer, I guess. |
| Chantry |
Posted: July 30, 2010 10:44 am
|
|
Newbie ![]() ![]() Group: Members+ Posts: 20 Member No.: 30,155 Joined: July 27, 2010 |
Apparently the 16f628a has built in usart. I might look into USB out, I'd prefer USB as long as it doesn't have me pulling my hair out, which it very well might. Im am constrained by the pic and I'm not allowed to use other pre made boards or other pics, so if i were to do it I would have to do all the work myself.
I'll look into it now but i very well need more help on this :0 |
| Abdulla M.A. |
Posted: July 30, 2010 03:10 pm
|
![]() Forum Addict ++ ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Spamminator Taskforce Posts: 3,914 Member No.: 10,604 Joined: August 16, 2007 |
You can use USB/Serial converter with the max232, it will be good. I built this
circuit one year ago and I got the data on hyper terminal. Abdulla -------------------- "A scientist can discover a new star, but he cannot make one. He would have to ask an engineer to do that."
"For an optimist the glass is half full, for a pessimist it's half empty, and for an engineer is twice bigger than necessary." |
| Chantry |
Posted: July 30, 2010 08:50 pm
|
|
Newbie ![]() ![]() Group: Members+ Posts: 20 Member No.: 30,155 Joined: July 27, 2010 |
Did you code it in assembly or c?
|
| kellys_eye |
Posted: July 30, 2010 10:21 pm
|
![]() Forum Addict ++ ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Spamminator Taskforce Posts: 8,587 Member No.: 2,735 Joined: June 21, 2005 |
What kind of data?
I recently purchased a pre-programmed PIC with USB connection that was accessible through the normal games-controller drivers. It has 16 digital I/O lines and 8 (IIRC) analogue inputs too. It shows up as a 'multi-axis joystick' controller and can be interfaced through simple VB routines. -------------------- May contain nuts
|
| Chantry |
Posted: July 30, 2010 11:12 pm
|
|
Newbie ![]() ![]() Group: Members+ Posts: 20 Member No.: 30,155 Joined: July 27, 2010 |
Just a small quantity of text, say around 20 characters each time.
http://www.sparkfun.com/commerce/product_i...roducts_id=9115 This seems perfect, except that I wanted to put all compoenents directly on my board not use moles connections to connect to boards such as this. Even though it has e schematic on there, the actual chip looks too small to hand solder on my pcb. Have i got any options? This post has been edited by Chantry on July 30, 2010 11:17 pm |
| Chantry |
Posted: July 30, 2010 11:28 pm
|
|
Newbie ![]() ![]() Group: Members+ Posts: 20 Member No.: 30,155 Joined: July 27, 2010 |
Small update. I found a module that looks like it would work and is large enough for me to solder the components onto my own board directly:
Link Any feedback if this would work? This post has been edited by Chantry on July 30, 2010 11:29 pm |
| Abdulla M.A. |
Posted: July 31, 2010 08:15 am
|
||
![]() Forum Addict ++ ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Spamminator Taskforce Posts: 3,914 Member No.: 10,604 Joined: August 16, 2007 |
My code was in C. Abdulla -------------------- "A scientist can discover a new star, but he cannot make one. He would have to ask an engineer to do that."
"For an optimist the glass is half full, for a pessimist it's half empty, and for an engineer is twice bigger than necessary." |
||
| millwood |
Posted: July 31, 2010 11:45 am
|
|
Forum Addict ![]() ![]() ![]() ![]() ![]() ![]() Group: Trusted Members Posts: 701 Member No.: 25,377 Joined: July 26, 2009 |
to use the usb/uart converter, you still have to program a uart interface on your mcu. if you are going to do that, you might as well use a uart connection directly to the pc.
|
| Chantry |
Posted: July 31, 2010 05:11 pm
|
|
Newbie ![]() ![]() Group: Members+ Posts: 20 Member No.: 30,155 Joined: July 27, 2010 |
The benefit of USB that I can see is, if I say it uses USB connection, everyone knows what im talking about, if I use a "serial" connection, im probably going to get a lot of blank faces. The other benefit is the box for this board is extremely small, it would help me out not to have a wacking great serial socket on it, and instead have a USB mini socket.
Im still undecided, I guess first I should try to program the PIC to output the Uart and see how I go from there. |
![]() |
![]() ![]() ![]() |
:: support us ::