Arduino digital I/O
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am using an Arduino Mega 2560 to control a 5-bit parallel digital RF attenuator. At this time I am sending 1 bit at a time with 'writeDigitalPin', which is slow. Is there such a thing as 'writeDigitalWord' so I can write all 5 bits at once? Dave
0 commentaires
Réponses (1)
Rohan Kale
le 14 Fév 2020
It is my understanding that you are trying to write an attenuation value by setting the 5-bits of the attenuator simultaneously. I also think that the timing of the control waveforms, i.e. the RF attenuation bits, may be critical as far as varying the RF power attenuation in realtime is concerned. However, there are no such methods/APIs as of R2019b under the MATLAB® Support Package for Arduino® hardware, which might provide a functionality to write the Arduino board's port pins simulatenously, i.e port write.
But I think you may consider a quick workaround using shiftregisters to write approproiate data to the RF attenuator, if it is not too much of a modificaiton to your hardware setup. Please refer to the documentation page on working with the shift register using MATLAB®:
0 commentaires
Voir également
Catégories
En savoir plus sur MATLAB Support Package for Arduino Hardware dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!