??? 12/04/10 15:43 Read: times |
#179870 - Smart Door Knobs Responding to: ???'s previous message |
Erik Malund said:
yes, the code is trivial, but (at least with trivial code) you end up with a uC that is dead as a doorknob while the IIC transfer goes on.
Erik Not so in most of my designs with MCUs!! I put most of the real time "work" of the MCU into periodic state machine tasks that are sequenced off a timer interrupt activity. I2C access goes on in an independant manner when called as needed from the "main loop". In many designs the main loop's function rests with processing commands from the outside where a request/response type design simply has a short delay to the response if the command involves an I2C type transaction. All things such as managing timers, input scanning, flashing, sampling, PID control and even computational state machines are handled in the real time foreground. Bit banged I2C works just fine to dumb parts like serial EEPROMs even if interrupted mid-stream of doing a transaction. So it really comes down to a case of careful design ahead of time. If you have an I2C device that must be involved in a critical real time way with the overall function of the MCU algorithm then the hardware I2C engine can be useful. However, to be honest I have various times done bit banged I2C access to serial EEPROMs even when the MCU had an I2C engine because doing so was easier, quicker and fast enough. Michael Karas |
Topic | Author | Date |
I2C EEPROMs, best data sheets? | 01/01/70 00:00 | |
as we are on 8052.com... | 01/01/70 00:00 | |
my first | 01/01/70 00:00 | |
what uC | 01/01/70 00:00 | |
bit-banging I2C master for EEPROMs is trivial | 01/01/70 00:00 | |
yes, the code is trivial, but ... | 01/01/70 00:00 | |
Probably majority units don't suffer from the busy-loops | 01/01/70 00:00 | |
Smart Door Knobs | 01/01/70 00:00 | |
Andy, Michael | 01/01/70 00:00 | |
ADuC7026 | 01/01/70 00:00 | |
WP pin ? | 01/01/70 00:00 | |
It works sometimes | 01/01/70 00:00 | |
Timing - erase? | 01/01/70 00:00 | |
can you givenot enough time? | 01/01/70 00:00 | |
No erase, no abort | 01/01/70 00:00 | |
Hidden erase | 01/01/70 00:00 | |
STOP too short | 01/01/70 00:00 | |
Problem solved (I think) | 01/01/70 00:00 | |
I2C | 01/01/70 00:00 |