Author Topic: turn on/off LED PCB with usb module  (Read 843 times)

Offline scottymo87

  • Newbie
  • *
  • Posts: 1
  • Matlab Forum
    • View Profile
turn on/off LED PCB with usb module
« on: August 21, 2010, 12:39:19 AM »
So I have a PCB populated with an array of LEDs hooked up toa power source and interfaced to my computer with an Elexol USBMOD3 usb module.I am trying to use Matlab to send a signal to the usb module to turn the LEDson and off. The active pin in the circuit is the “RXD  UART – Receive Data Input” pin. So far Ihave created a serial device and opened it for writing using the following:
 
LED = serial(‘COM4’)
fopen(LED)
 
I know the LEDs work because when I short the usb module theLEDs turn on. I assume I just need to send a signal switching the pin betweenhigh and low? So my questions are:
 
1.    Is this the correct pin to be using for this?
2.    What code do I need to send to the usb module toswitch the signal to high?
 
This seems simple but I am very new to this. The link to theuser’s guide for the USBMOD3 is below which will show all the possible pins Ican use. Thanks for the help!
 
http://www.elexol.com/Download/documents/USBMOD3DS1.pdf

Offline bluesky2076

  • Newbie
  • *
  • Posts: 1
  • Matlab Forum
    • View Profile
Re: turn on/off LED PCB with usb module
« Reply #1 on: August 23, 2010, 01:14:43 PM »
we can open COM and turn on/turn off LEDs when we use the software programming Matlab

thanks,,,,

Matlab and SimuLink Development Forum

Re: turn on/off LED PCB with usb module
« Reply #1 on: August 23, 2010, 01:14:43 PM »