Hello
I just want know, how to send digital bits of information from the pic board to pc, say a 0 or 1 is supposed to be sent to the pc itself. How this colud be done. Say a led is turned off or on this should be sent to the computer and how could this information be received , (I am using a 16F876 microcontroller and C language ) please let me know . thank you ukweb
Digital bits of inforamtion from matrix multimedia board
-
- Posts: 110
- Joined: Thu Sep 29, 2005 10:53 am
- Location: Matrix Multimedia
- Been thanked: 1 time
- Contact:
Sending a signal to a PC is easy. The hard bit is getting the PC to do anything with it.
Two basic methods - serial comms or manually.
Serial comms
=========
You can use serial comms systems such as RS232 or I2C etc. to send data to the PC.
Lots of Eblocks to help here. And Serial comms is a well known practice so help should be easier.
Manually
======
Wire the output(s) to a suitable connector type such as a Serial port lead. resistors and other bit of electrickery may be needed to prevent damage to or from the PC though so this is not for the faint hearted. Also means that your comms are completely custom and will need to be handled in a custom manner on the PC too. Possibly useful for things like gameport Joysticks though, as they have pre defined setups.
On the PC
=======
Getting the PC to read the signal is another matter.
There are some programs such as Hyperterminal that can monitor the COM ports and read data sent to it. Useful for testing, but not much more.
But for active applications you would need to dig in deep and use Port APIs to retrieve the data. Serial COM API routines are available for most languages such as C++/VB/Delphi etc. so you should be able to get some help from the API documentation.
Two basic methods - serial comms or manually.
Serial comms
=========
You can use serial comms systems such as RS232 or I2C etc. to send data to the PC.
Lots of Eblocks to help here. And Serial comms is a well known practice so help should be easier.
Manually
======
Wire the output(s) to a suitable connector type such as a Serial port lead. resistors and other bit of electrickery may be needed to prevent damage to or from the PC though so this is not for the faint hearted. Also means that your comms are completely custom and will need to be handled in a custom manner on the PC too. Possibly useful for things like gameport Joysticks though, as they have pre defined setups.
On the PC
=======
Getting the PC to read the signal is another matter.
There are some programs such as Hyperterminal that can monitor the COM ports and read data sent to it. Useful for testing, but not much more.
But for active applications you would need to dig in deep and use Port APIs to retrieve the data. Serial COM API routines are available for most languages such as C++/VB/Delphi etc. so you should be able to get some help from the API documentation.