Redes

Páginas: 2 (285 palabras) Publicado: 10 de octubre de 2012
| |   | |
|
|

USB Data acquisition with PIC18F4550

This project is simple and small component count USB data acquisition or USB DAQ. The main core of USBdevice is PIC18F4550 .The firmware for PIC modified from Microchip CDC library.

I use Delphi 6 on PC side to communicate with PIC18F4550
source code availible.Specifications

- 8 Digital output
- 8 Digital input
- 8 Analog output
- No external power required
- Simple ASCII command
- 3 command to communicate PC with PICFigure 1 Schematic
Command

CommandPC Send PIC respone
Write digital output *ANS#13-
Read digital input *B#13*BHH#13
Read analog input*AK#13*AKXXXX#13

When :
N= bit that we need to set or clear (0-7)
S = state of bit (0-1)
HH = Input status from digital input port (00-FF)
K = Channel of analog input ( 0-7)
XXXX = analoginput value in decimal of 10 bit binary (0000-1023 )
#13 = end of command

Example to set bit 0 of digital output
*A01#13

Example to clear bit 0 of digital output*A00#13

Example to read digital input
*B#13
then PIC respone with
*B7F#13
This mean bit 7 of digital input was low

Example to read analog input channel 4*C4#13

then PIC respone with
*C41023#13
This mean that analog channel 4 have 5 volt on this channel
becuase 1023 = 3FFh

Figure 2 PC side software | | |

  |  |
When connect this USB Data acquisition with PC then windows ask for driver after driver installed(only first time) you will have a new COMx if not connect the COMxnot create by Windows.

How to set configuration read this article

Download source code
Firmware C18 Compiler , Delphi 6 example,Windows device driver (Win2K/XP) |
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Red De Redes
  • Red de redes
  • Redes
  • Redes
  • Redes
  • Redes
  • Redes
  • Redes

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS