Jump to content

Communicating with port's in C

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
8 replies to this topic

#1
yaz_calis

yaz_calis

    Newbie

  • Members
  • Pip
  • 4 posts
Hi there,

I am looking for information/tutorials/code that will help me out. I have prior programming experience in C, but am a beginner as regards communicating outside the computer my application is running on. I was really wondering how exactly I can get my application to communicate with the USB port, for the purposes of reading, and writing data. I am assuming communications must go through a device driver for this type of programming?

Any information would be helpful!

Thank you

#2
v0id

v0id

    Retired

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,936 posts
This highly depends on the platform you're using. If you could tell us which operating system you're using, I'm sure someone could help you.

#3
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,720 posts
It also depends on what you're communicating with. If it's some sort of device like a joystick, camera, flash drive, etc., you might have to delve into the realm of device drivers and DLLs.

#4
yaz_calis

yaz_calis

    Newbie

  • Members
  • Pip
  • 4 posts
Sorry forgot to add in all the details.

Operating system : Windows XP
Device: PICDEM FS USB demo board

I'm assuming I have to use the device drivers that came with the board, but how to access the functions already included in those device drivers would be helpful as im new to this!

#5
v0id

v0id

    Retired

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,936 posts
Didn't you get some specifications with it? If you didn't, you are probably able to find them somewhere on the internet. The specifications will include everything you want to need about the board.

#6
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,720 posts
If not, you can open a copy of the driver in Notepad and find a list of all the function names in the DLL, then look them up on the internet. It's primitive, but it works.

#7
yaz_calis

yaz_calis

    Newbie

  • Members
  • Pip
  • 4 posts
No, I did not get any specifications with it. I will try checking out the DLL, thanks for the information!

#8
v0id

v0id

    Retired

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,936 posts
There's better ways to find the functions in a DLL-file, than opening the file in Notepad. But of course, opening the file in Notepad is one solution. I know Windows has a built-in utility for the purpose, but unfortunately I don't remember the name of it.

#9
yaz_calis

yaz_calis

    Newbie

  • Members
  • Pip
  • 4 posts
I've found some dll viewer/editor software as well on the internet that I will try out.