Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Controlling Netduino from PC


  • Please log in to reply
6 replies to this topic

#1 Jean

Jean

    New Member

  • Members
  • Pip
  • 3 posts

Posted 25 July 2012 - 09:27 AM

Hi, I'm pretty new to this dev board stuff so please bear with me. I'm looking for a device which I can use to drive 7-segment LED's (+- 20) directly from my PC. I will have a C# app which will provide the values to be displayed on the LED's. I was thinking of using the MAX72xx serial display chips to make it a bit easier. My question is: Is it possible to control the SPI pins on the Netduino directly from my C# app running on my PC via USB to drive the LED's? Do I need a USB to serial interface or cable? Is this a feasible solution for driving LED's from my PC, or should I be looking at something else? Any info would be greatly appreciated. Thanks, Jean

#2 Nobby

Nobby

    Advanced Member

  • Members
  • PipPipPip
  • 70 posts

Posted 25 July 2012 - 10:48 AM

The most common options are UART(RS232 or RS485 from the PC to the netduino) or TCP/UDP network stream/packets. The second option requires either a Netduino Plus or a Netduino with an Ethernet Shield. You can also use I2C(TWI) and SPI but you need to build interfaces at both ends. I'm not even sure you can get something like USB->TWI or USB->SPI(apart from microcontroller programmers) that you can put at the PC to send data to the Netduino. As far as I know, you can't utilise the USB socket for runtime applications but I could be wrong about that. For the 7-Seg display side of things, the serial drivers are usually the best option. They require minimal GPIO pins from the netduino compared to other options. You need to make sure the current capacity of the drivers exceeds the rating of the 7-seg displays as well otherwise they'll heat up and die fairly quickly

#3 Jean

Jean

    New Member

  • Members
  • Pip
  • 3 posts

Posted 26 July 2012 - 11:48 AM

Would this work...? I connect a FTDI breakout board to my Netduino and connect it to my PC via USB. I connect my serial display driver IC to the SPI pins on the Netduino. I write a C# app on the pc which will communicate to the Netduino via the virtual COM port on USB to control the SPI pins on the Netduino. (Or should I have an app running on the Netduino to receive the instructions from the PC and then have this app on the Netduino control the SPI pins?)

#4 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 26 July 2012 - 11:53 AM

I write a C# app on the pc which will communicate to the Netduino via the virtual COM port on USB to control the SPI pins on the Netduino. (Or should I have an app running on the Netduino to receive the instructions from the PC and then have this app on the Netduino control the SPI pins?)


You need the app on the Netduino also. This should listen to the commands coming in over the serial line and then control the SPI pins accordingly.

Regards,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#5 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 26 July 2012 - 03:57 PM

Sounds like you are taking a complicated approach to a simple problem. You may just want a serial controlled 7 seg display and control it from the serial port on the pc. One like this - https://www.sparkfun.com/products/9766 If you want USB instead of serial, simply use the FTDI connected to the serial 7 seg or get one like this that connects right to USB - http://www.makershed...uct_p/mkfl1.htm If the 7seg is always going to need to be connected to the PC, don't waste a Netduino on this simple communication task.

#6 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 26 July 2012 - 05:25 PM

You might want to consider the mcp2210 usb to spi chip from Microchip, lovely little device available in a soic20 package.

#7 Jean

Jean

    New Member

  • Members
  • Pip
  • 3 posts

Posted 27 July 2012 - 10:14 AM

Thanks guys, Will look into this.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.