Ok, I understand that it is not possible to evolve the basic of my eMEGA it I'll have to pass to the C language, which removes much of interest to continue to use it, but I did not buy it to watch in box.
So, I insist a little more to do something interesting with.
Wanting to control a servo, in basic language, I want the equivalent of the command "PULSE" existing version 3 and 4 of the DMBASIC but my board is limited to a version 2 so this very useful command is missing ... of this last generation beautifull board ... ;D
Thank you for telling me how to replace this command, because it would be useful for other things such as use a ultrasonic transmitter/receiver.
Sorry if my question is simple, but I looked in the user manual and I found nothing other than this :
Sound output can be used as a Pulse Width Modulation (PWM)
The signal will be available at the sound connector and the voltage
divider on this output should be removed so that the full signal level is available !!!!
Explain to me why there is a voltage divider here, and what are the resulting consequences after having removed ?
Is it possible to use a normal output pin to send a PWM like with the PULSE command of DMBASIC V3 and V4 ?
Or it is still a limitation due to the basic version on the eMEGA board ...
Happy new year.
Lorenzo
Lorenzo
I think the voltage divider is there to reduce the voltage from the processor to the line voltage suitable for the audio output (1Vtt). See R36 and R39 in https://www.olimex.com/Products/Duino/Duinomite/DUINOMITE-eMEGA/resources/DUINOMITE-EMEGA-REV-A-SCHEMATIC.pdf (https://www.olimex.com/Products/Duino/Duinomite/DUINOMITE-eMEGA/resources/DUINOMITE-EMEGA-REV-A-SCHEMATIC.pdf). Removing the divider (shortcut R36?) or directly using SOUND signal on the board gives you the full digital PWM signal 0..3.3V.
Thierry