Basically, ZDI has simple read/write interface similar to I2C bus. Communication starts with START condition, 7-bit address is sent and read/write selector bit, 9-th bit is used as bit separator to allow change between input and output direction.
Unfortunately, I2C peripheral is not usable for this purpose.
To simplify initial debugging, ATmega8 interface is connected to UART, so it can be easily controlled from serial terminal.
Interface has two basic commands:
- ZDIW <addr> <data> [<data> ...]
- ZDIR <addr> [<count>]
These commands should be sufficient to control all future things but for manual testing/debugging other "high-level" commands were added:
- REG [<reg_name> [<value>]]
- MEMR <addr> [<count>]
- MEMW <addr> <data> [<data> ...]
- IN <port>
- OUT <port> <data>
- STOP
- RUN
- STEP
- EXEC <opcode> [<opcode2> ...]
- :<Intel-HEX format ...>
I plan to add better debugging support: setting break addresses, smart register printing (changed registers only) etc.
Now it is time to work on programming utility...
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.