Hybrid View
-
10-06-2020 #1
Hi Doddy,
So it turns out if you ditch the standard I2C/TWI wire.h library and display driver, crack open the 328p datasheet, write your own crude framebuffer and I2C non-bocking state machine that operates directly on the TWI registers you can tick the state machine at a 2-3us per tick penalty. Will put it on the scope and see if this is sufficient.
Main loop becomes:
1. Mirror stepper/home signals with squaring logic.
2. Update framebuffer if needed (using a 5x7 font this is 5 memory reads/writes per character)
3. Tick I2C state machine.
I could remove the framebuffer to make it a bit faster if required, this will effectively amortise the font copy part at one byte/I2C tick.
Cheers, JoeLast edited by devmonkey; 10-06-2020 at 08:23 AM.
-
The Following User Says Thank You to devmonkey For This Useful Post:
-
10-06-2020 #2
"Crude"?, I prefer to think of this as "fit-for-purpose".
You know as well as I do the 328 is just one of a thousand different micro controllers that pollute the oceans and the Arduinio packaging is just a convenient way of throwing that chip into an accessible form for stupidly low cost - makes them a sensible solution for even the most simple of problems. There's no reason to use the Arduino libraries unless you're concerned about cross-platform compatibility or speed/ease of development (sacrificing code base, efficiency and real-time performance). I think you'd agree programming at the register level (I gave up at the instruction level many decades ago - I prefer to have a compiler at least) adds a level of complexity and care, but if that floats-your-boat (and it does, me) then hack away to your hearts content. At least you can be confident that you know exactly that the uC is behaving exactly as you want it to.
Thread Information
Users Browsing this Thread
There are currently 4 users browsing this thread. (0 members and 4 guests)
Similar Threads
-
BUILD LOG: 8x4 router build. Steel base & Aluminium gantry gantry
By D-man in forum DIY Router Build LogsReplies: 57Last Post: 13-12-2019, 10:43 AM -
BUILD LOG: Design stage - All steel - 1200x750x110 - aluminium capable (hopefully)
By oliv49 in forum DIY Router Build LogsReplies: 3Last Post: 08-06-2018, 01:18 PM -
welding steel base or just getting aluminium extrusion
By reefy86 in forum Gantry/Router Machines & BuildingReplies: 200Last Post: 15-01-2018, 08:55 AM -
BUILD LOG: Steel Frame, Aluminium Hybrid Design Thread
By f1sy in forum DIY Router Build LogsReplies: 0Last Post: 23-02-2016, 10:04 AM -
Steel vs Aluminium
By gavztheouch in forum Metalwork DiscussionReplies: 4Last Post: 26-05-2014, 10:11 PM
Bookmarks