NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
Hir_ec
Posts: 4
0 Kudos

interfacing wsn with pic microcontroller

Hi,

Since I am new to labview and I want to interface wireless sensor module pioneer with pic Microcontroller using USB is it possible to do so??

If yes then pls give me some hint

Thnks in advance

 

Active Participant
Corby_B
Posts: 359
0 Kudos

Re: interfacing wsn with pic microcontroller

Hello Hir_ec,

 

This sounds very intersting. Are you trying to interface a wsn node like the 3212 or 3202 with a USB microcontroller? 

 

The DIO lines on the nodes are software timed using the LabVIEW WSN Module. So it might be easier to interact with the DIO lines of your microcontroller instead of the high speed USB bus. What do you need to communicate to the node? 

 

I have personally interacted with a serial LCD screen using SPI communication. So using a digital line for my clock and another for my data. It was really slow but I could update my LCD screen in ~ 1-2 seconds. 

 

Hope this helps!

 

Corby

 

R & D WSN Product Support Engineer

Member
asper
Posts: 70
0 Kudos

Re: interfacing wsn with pic microcontroller

Hi Corby,

I would like to acquire with a WSN node some sensors that use SPI communication, could you please share your SPI example?

 

Thanks,

Asper

Active Participant
Corby_B
Posts: 359
0 Kudos

Re: interfacing wsn with pic microcontroller

Hello Asper,

 

Thanks for the post!

 

I would be happy to post my code. See the attached LV 2010 project. 

 

I used a serial SPI capable LCD screen from Crystalfontz to show locally what the temperature (using a thermocouple) and set point (using a potentiometer) are coming into the AI lines of the NI WSN-3212 node. Using just 2 digital lines, one for my SPI software timed clock and another for the data, I was able to update the screen with this information. I just pulled low the chip select line since the only thing I was communicating with was the LCD screen. I used the LabVIEW WSN Module to program LabVIEW directly on the WSN nodes. This is what allowed me to have control of the digital lines to make a CLK and DATA line.  

 

Requirements for the project:

 

LabVIEW 2010 or later

LabVIEW 2010 WSN Module (for programming on the node)

NI-WSN 1.2.1 or later.  

 

Best of luck to you on your projects!

 

Corby

WSN R & D Product Support Engineer

Member
asper
Posts: 70
0 Kudos

Re: interfacing wsn with pic microcontroller

Hi Corby,

thanks for the code, it look like very easy … I will try to modify it to query my sensor for acquired data.

 

Regards,

Asper

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page