Vba For Excel Serial Communication With Arduino Microcontroller

Vba For Excel Serial Communication With Arduino Microcontroller Average ratng: 4,8/5 6950 reviews

Controle de portas digitais do Arduino Uno com planilha Excel Tutorial completo em: www.mecatronizando.com.br FanPage: https://www.facebook.com/mecatronizand.

Dear AVR Pros, i am looking for an easy and affordable way to interface an SPI Daisy chain consisting of 30 or more ATmega8 Slaves with a Windows 7 PC with Excel VBA. I was thinking about an Arduino or something like that to receive serial commands from Excel and translating them to be fed on the SPI bus. Is this actually possible or is there maybe an easier way, such as a USB to SPI adapter which can be talked to via a virtual com port? I guess the AVRISP mkII can't be used for this since i couldn't figure out how to generate custom bytes at its SPI output. Kak sdelatj pistolet v domashnih usloviyah.

I appreciate any kind of input, since i am quite a newbie in microcontrollers. Thank you very much in advance! Best regards. Thank you guys!

@ clawson: after further investigation, the Arduino sounds like a good solution to me. I hope i didn't overlook any disadvantages which could affect my project. I will only be using one SS-line and daisy chain the slaves together according to this connection scheme: So basically i will be pushing the data through all the slaves and they will filter out whats meant for them using unique addresses. @ awneil: can you tell me what is better about the expensive device, compared to an Arduino or the cheap USB devices you mentioned? I really appreciate your help guys, thank you! I've seen this thread before, but can't see how it relates to the problem. Of course i will try to make the lines as short as possible, maybe even just stack the master and slave pcbs on top of each other.

In post #3 of the mentioned thread there is an example calculation, mentioning a 28 feet distance at 8 mHz SPI clockrate. I don't even think that i will need 8 mHz since i only need to transmit 24 bit to each slave with an update rate of maybe 20 ms. Is there something i'm overlooking?

Thank you very much! Best regards.

Prizefighter wrote: @ awneil: can you tell me what is better about the expensive device, compared to an Arduino or the cheap USB devices you mentioned? Well, what constitutes 'better' depends entirely on the particular requirements!

You can see an overview of key features & performance here: Trying to think back (it was a couple of years ago), IIRC, the key requirement was for an SPI Slave; which is what ruled-out the FTDI devices - but doesn't matter for you. Also, being a supported off-the-shelf unit, in a proper case, was a big plus.

Quote: Can you give me an example how this would be implemented hard- and softwarewise?I can't give you a better example than Google can.:) It has also been discussed here countless times: Consider also I2C (aka TWI) or 1-WIRE. Your requirement of 24 bits every 20 ms is easily managed by all of those. That's a total of 1.2 kbps per slave.

With 30 slaves, that's 36 kbps. Even if you were to add another 8 bits per message for addressing, that's 48 kbps. All of those interfaces can easily handle that speed. RS-485 requires external transceiver chips on each slave. The others do not. Many AVR support I2C in hardware.

Those that don't can 'bit-bang' it. 1-WIRE has no support in hardware, but can easily be bit-banged. There are libraries available for all of these options, so you don't have to re-invent the wheel.

For this you will need: -Windows (tested on xp) -Arduino IDE -Microsoft office (tested on 2010) -PLX-DAQ (expansion for excel) -Arduino (tested on UNO, but any board should work) I am assuming that you’ve already got an Arduino, Windows, Arduino IDE and Excel. Here’s the link to download PLX-DAQ: You only need to download and install it, it should work fine.