Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Can Digital to analog conversion be done using PIC ?

Status
Not open for further replies.

Kunal2

Junior Member level 3
Joined
Jun 21, 2011
Messages
27
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,512
Hello everybody

i am doing a project in which i need to perform an A/D conversion using PIC, then transmit the data wireless to the receiver. Then i need to input the signal in labview.

My queries are :

1) whether we can enter digital value received through DAQ in labview or should we use analog inputs
2) if analog signals are needed, how can digital data received be converted in analog and then input in labview.

Your help will be very kindly appreciated.

Kind regards

Kunal
 

Your title doesn't really match the body of your question. Yes, you can do digital to analog conversion with a PIC (Use the PWM output. Connect it to a capacitor and you'll get a voltage proportional to the pulse width).

What is your receiver, exactly? Does it have a serial/parallel output? If so, I think you can bring that into labview through some interface card, no need to convert it back to analog.
 
i am doing a project in which i need to perform an A/D conversion using PIC, then transmit the data wireless to the receiver. Then i need to input the signal in labview.

As Barry mentioned the title of this thread does not match body of your post.

Do you want the PIC to perform an Analog to Digital (ADC) or Digital to Analog (DAC) Conversion?

Either way the answer is yes. You can communicate the digital values to and from LabView via a serial link, either RS-232 or USB virtual communication port (VCP) if your choice of PIC has this feature.

A couple of examples:

**broken link removed**

Development of an Electronic Nose-Tongue Data Acquisition System using a Microcontroller

Here is a Microchip Demo Board specifically designed to interface with LabView, you can use the schematics and code for inspiration:

The MCP3909 ADC Evaluation Board for 16-Bit MCUs system provides the ability to evaluate the performance of the MCP3909 dual channel ADC. It also provides a development platform for 16-bit PIC based applications, using existing 100-pin PIM systems compatible with the Explorer-16 and other high pincount PIC demo boards. The system comes with programmed PIC24FJ128GA010 and dsPIC33FJ256GP710 PIM modules that communicate both to on-board LCD and a LabView GUI for both in-circuit and PC signal processing.

**broken link removed**

1) whether we can enter digital value received through DAQ in labview or should we use analog inputs

I believe the examples provided above should answer this question. If not post additional questions.

2) if analog signals are needed, how can digital data received be converted in analog and then input in labview.

I do not see any reason for this being the case. Digital data can be sent and received by LabView, the PIC should be able to carry out the conversion either direction.

Hope the examples and info answered your questions.

BigDog
 
  • Like
Reactions: FvM and Kunal2

    Kunal2

    Points: 2
    Helpful Answer Positive Rating

    FvM

    Points: 2
    Helpful Answer Positive Rating
Hello

Thanks for the links and posts Barry and Bigdog. They were informative. I am sorry about the title and body.

However ive got another thing to ask. Can you please help?

NI CB-68LP - Unshielded 68-Pin I/O Connector Block - National Instruments

The above link is the connector block i have together with a NI PCI card. I wanted to know if i can connect the PCI card in my pc and connect the connector block with the PCI card and then enter my signal(analog or digital) via the connector. Will it be logged onto my labview??

kind regards

Kunal
 

NI CB-68LP - Unshielded 68-Pin I/O Connector Block - National Instruments

The above link is the connector block i have together with a NI PCI card. I wanted to know if i can connect the PCI card in my pc and connect the connector block with the PCI card and then enter my signal(analog or digital) via the connector. Will it be logged onto my labview??

If you have a NI DAQ PCI Card, 68LP Cable and the CB-68LP, you can most certainly use this setup together with LabView to carryout both ADC and DAC.

What is the exact model of NI DAQ Card you have?

It should be fairly straight forward to use LabView to accomplish these tasks with the hardware you describe.

BigDog
 
  • Like
Reactions: FvM and Kunal2

    Kunal2

    Points: 2
    Helpful Answer Positive Rating

    FvM

    Points: 2
    Helpful Answer Positive Rating
I have this pci.. Its a NI PCI-6518.

NI PCI-6518 (16 Inputs, 16 Source Outputs) - Low-Cost 37-Pin Industrial Digital I/O -- 30 V, Bank-Isolated - National Instruments

You know what i want to do is as follows :
1) Convert voltage from analog to digital form by a pic then transmit via wireless transmitter
2) Then receive the data process it again by a pic for checking any loss in bits and then either convert it to analog or let it be digital.
3) Then enter the signal in labview.

As i told you i got this PCI card and the NI CB-68 LP connector + cable, so what i want to know if whether i can take out the data out from a port of the pic and enter it in LABVIEW via one of the slots of the CB-68 LP connector.

One more thing; does the number of bits of the digital signal be an issue since the pic will convert analog signal to a 10-bit digital value?

Thanks for your help. Relying on your generosity.

Kind regards

Kunal
 

One more thing; does the number of bits of the digital signal be an issue since the pic will convert analog signal to a 10-bit digital value?

No, it shouldn't be. The more bits of an ADC conversion the better the resolution or the finer the increment of voltage you can represent.

You'll have to store the ADC value in an Integer or type Int even though the value will only utilize 10-bits of a 16-bit variable.

When you send the data from the PIC to the PC or back again, you'll need to convert the value into ASCII form for serial transmission.

In other words, the Integer value 34,567 would be converted to the character string "34,567" and then converted back to an Integer for arithmetic calculations.

BigDog
 
  • Like
Reactions: FvM and Kunal2

    Kunal2

    Points: 2
    Helpful Answer Positive Rating

    FvM

    Points: 2
    Helpful Answer Positive Rating
Thanks a lot. This was very helpful.

G O D bless you folks.

Kind regards

Kunal
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top