Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By mikekgr
#70504 Dear Sirs,
in one project that I am thinking of, there is a need to send out an ASCII String ( ok not exactly ASCII but modified to 7 bits, stored to a String variable ) as a bit stream through a GPIO pin of my Wemos esp8266 MPU. The bit stream rate should be 100 bits per seconds. { 10 msec each bit, 70 msec each character, baud rate = 1000 msec / 10 msec = 100 baud }
What do you think? What is the best way to implement it?

Thanks and Best Regards,
Mike Kranidis

( For more precisely information please see the bellow link:
https://en.wikipedia.org/wiki/ARQ-M#ITA3
See at Alphabet
Of Course I will have a conversion mechanism between the palin ASCII code the the system will use to store the messages, to 7 bits coded characters and then these 7 bits coded characters will be streamed out in digital form as a 7 bits coded characters to serial output. )
User avatar
By mrburnette
#70513 Mike,

You may wish to look over the code for ESP8266 versions for SoftwareSerial and adapt to fit your needs:

https://www.google.com/search?q=esp8266+softwareserial

Do remember that the Arduino code is time-sliced by non-OS, so you are going to have to be very careful in your timings.

Ray
User avatar
By mikekgr
#70515
mrburnette wrote:Mike,

You may wish to look over the code for ESP8266 versions for SoftwareSerial and adapt to fit your needs:

https://www.google.com/search?q=esp8266+softwareserial

Do remember that the Arduino code is time-sliced by non-OS, so you are going to have to be very careful in your timings.

Ray


Thanks a lot dear Ray. I thought about the softwareserial but I can not modified / tailor made to my need by myself...

To give some more details:
1) I need only serialize data transmission only, not reception necessary.
2) this serialize data transmission will haven't start or stop bit(s).
3) the timing will be quite slow but need to be accurate: each bit will have 10 msec duration so the Baud rate is : 1000 msec / 10 msec = 100 Baud each character or symbol will have 7bits x 10 msec = 70 msec

Any help will be appreciated.
Best Regards,
Mike Kranidis
User avatar
By mrburnette
#70534 Mike,

Please reference my respose to Urs in this link:
viewtopic.php?f=29&t=16124

The fact that loop() is always interrupted by a call to the background means that your Arduino code must understand it is not the only task running. Therefore timing concepts used in an AVR arduino world may fail under ESP8266 Arduino.

An option may be the newer ESP32 chip but I do not know the maturity of the "Arduino core" :

https://github.com/espressif/arduino-esp32

Ray