Comments (5)
Thanks for your observation. I wouldn’t be at all surprised if the time it takes for digitalWrite has changed since I timed those out on my scope.
-br
On Jan 29, 2014, at 9:09 AM, Matthijs Kooijman [email protected] wrote:
When using the software serial support, using:
baud(2, 19200)
print #2, "abcd"
My USB TTL converter receives garbage. Running at 9600 works, but at higher speeds (I also tried 14400) it fails. When I raise the bitrate a bit (on the bitlash end), things start to work. Setting 20100 in bitlash and 19200 in my TTL adapter seems to work reliably.This seems to suggest that the delay employed by the softwareserial is slightly too high (since a higher baudrate causes a lower delay). I guess the bittime calculation should account for more than 50 clockcycles overhead? 50 cycles of overhead seems a lot already, but I think that it's mainly the digitalWrite that takes a long time...
bittime[pin] = (1000000/baud) - clockCyclesToMicroseconds(50);
Note that I'm running on GCC 4.8, which might also cause differences in overhead...—
Reply to this email directly or view it on GitHub.
from bitlash.
Yeah, likely. It's hard to do these things right unless you do handcoded ASM, but then you again lose the Arduino provided abstractions. Not a big deal though, I just wanted to report this now to prevent thinking later that the changes I'm working on broke this ;-p
from bitlash.
Here's my work so far: https://github.com/Pinoccio/library-bitlash/commits/printstream
In addition to using the Print and Stream classes, also some (seemingly) old stuff is removed and I touched some other things I came across. The second to last commit (Pinoccio@e91dd2a) is the most important one.
Right now, there is still a considerable size increase, with the bitlashdemo example on the Mega2560, the program size goes from 17,922 to 18,592 and the memory size from 5,839 to 5,870. I'm still looking as to where this increase comes from exactly to see if some of it might be avoided.
I have tested this on Arduino 1.5.5+ (git master), haven't tried 1.0.x yet (but I didn't want to keep you waiting for that :-D).
from bitlash.
I took a quick look. You’re certainly making fast work.
FYI, the Teensy and Avropendous defines will need to stay.
-br
On Jan 29, 2014, at 10:55 AM, Matthijs Kooijman [email protected] wrote:
Here's my work so far: https://github.com/Pinoccio/library-bitlash/commits/printstream
In addition to using the Print and Stream classes, also some (seemingly) old stuff is removed and I touched some other things I came across. The second to last commit (Pinoccio/library-bitlash@e91dd2a) is the most important one.
Right now, there is still a considerable size increase, with the bitlashdemo example on the Mega2560, the program size goes from 17,922 to 18,592 and the memory size from 5,839 to 5,870. I'm still looking as to where this increase comes from exactly to see if some of it might be avoided.
I have tested this on Arduino 1.5.5+ (git master), haven't tried 1.0.x yet (but I didn't want to keep you waiting for that :-D).
—
Reply to this email directly or view it on GitHub.
from bitlash.
W00ps, these comments ended up in the wrong issue. I'll copy them over to the right one, feel free to delete them from here afterwards.
from bitlash.
Related Issues (20)
- Talk to arduino without >command HOT 6
- run bitlash code stored in flash HOT 5
- eeprom overflow error with bitlash run command for a user defined function HOT 3
- Blank user function causes following functions not to appear HOT 2
- Port to spark-core or esp-8266 HOT 7
- Not working on new Arduino.. HOT 9
- Can't save user functions to startup? HOT 27
- Deleted-cant add user functions to memory
- Cant add more then 9 commands inside startup functions
- No support for bypass serial
- Serial flash support? HOT 2
- No need to wait after Wire.requestFrom().
- LED was very dim when using bitlash HOT 1
- bitlash demo - blink does not blink HOT 5
- Problem of output buffer when using bitlash
- ========^ unexpected number error for functions HOT 5
- Run code from eeprom HOT 2
- Make SdCard example code use IDE's inbuilt SD API
- Maintained fork?
- update library for support lastet arduino ide version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitlash.