Powered by Invision Power Board


Forum Rules Forum Rules (Please read before posting)
  Reply to this topicStart new topicStart Poll

> How Difficult? Pic Data To Pc
Chantry
Posted: July 29, 2010 02:54 pm
Reply to this postQuote Post


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
PMEmail Poster
Top
Sparks
Posted: July 29, 2010 05:34 pm
Reply to this postQuote Post


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.
PMEmail PosterUsers Website
Top
srikanthsamaga
Posted: July 29, 2010 05:46 pm
Reply to this postQuote Post


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.
PMEmail PosterUsers Website
Top
Sparks
Posted: July 29, 2010 08:02 pm
Reply to this postQuote Post


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
PMEmail PosterUsers Website
Top
cdstahl
Posted: July 29, 2010 08:55 pm
Reply to this postQuote Post


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.
PMEmail Poster
Top
Chantry
Posted: July 29, 2010 11:03 pm
Reply to this postQuote Post


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.
PMEmail Poster
Top
MikeGyver
Posted: July 30, 2010 02:03 am
Reply to this postQuote Post


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.
PMEmail Poster
Top
VenomBallistics
Posted: July 30, 2010 04:39 am
Reply to this postQuote Post


Forum Addict ++
*******

Group: Trusted Members
Posts: 1,683
Member No.: 18,557
Joined: September 23, 2008




PIC18F2550 .... USB on board wink.gif
PMEmail PosterUsers Website
Top
millwood
Posted: July 30, 2010 04:52 am
Reply to this postQuote Post


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.
PMEmail Poster
Top
Chantry
Posted: July 30, 2010 10:44 am
Reply to this postQuote Post


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
PMEmail Poster
Top
Abdulla M.A.
Posted: July 30, 2010 03:10 pm
Reply to this postQuote Post


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."
PMEmail PosterUsers WebsiteYahoo
Top
Chantry
Posted: July 30, 2010 08:50 pm
Reply to this postQuote Post


Newbie
**

Group: Members+
Posts: 20
Member No.: 30,155
Joined: July 27, 2010




Did you code it in assembly or c?
PMEmail Poster
Top
kellys_eye
Posted: July 30, 2010 10:21 pm
Reply to this postQuote Post


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
PMEmail PosterYahoo
Top
Chantry
Posted: July 30, 2010 11:12 pm
Reply to this postQuote Post


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
PMEmail Poster
Top
Chantry
Posted: July 30, 2010 11:28 pm
Reply to this postQuote Post


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
PMEmail Poster
Top
Abdulla M.A.
Posted: July 31, 2010 08:15 am
Reply to this postQuote Post


Forum Addict ++
*******

Group: Spamminator Taskforce
Posts: 3,914
Member No.: 10,604
Joined: August 16, 2007




QUOTE (Chantry @ July 30, 2010 11:50 pm)
Did you code it in assembly or c?

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."
PMEmail PosterUsers WebsiteYahoo
Top
millwood
Posted: July 31, 2010 11:45 am
Reply to this postQuote Post


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.
PMEmail Poster
Top
Chantry
Posted: July 31, 2010 05:11 pm
Reply to this postQuote Post


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.
PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 


:: support us ::




ElectronicsSkin by DutchDork & The-Force