Post Created date
AVR128Dx TWI as I2C Sniffer...
Are those screenshots of a master read to a peripheral?  The first single transaction is a master read, which the slave nacks (comptrans+nack). The second is a master write...
Thursday, 19 May 2022 - 03:02
AVR128Dx TWI as I2C Sniffer...
Yes, I get why the master read has to be ignored. When a master read is ignored, the twi simply waits for the next start as it will do a comptrans+nack. So, we forget about...
Wednesday, 18 May 2022 - 20:06
AVR128Dx TWI as I2C Sniffer...
If we COMPTRANS+ACK there though, the TWI and the IO expander will both ACK, but the TWI will wait for the next Start and everything is fine. Maybe I still misunderstand- my...
Wednesday, 18 May 2022 - 06:58
AVR128Dx TWI as I2C Sniffer...
Hard to avoid collisions on reads as you do not know what will go on the bus from the other device before it happens. Maybe I misunderstood, but I assumed you only wanted to...
Wednesday, 18 May 2022 - 01:31
Attiny406 I2C communication problem
Actually those two lines are what MPLAB IDE wrote in an empty project I guess that was the other option. I have used mplabx from the start and at some point I changed the ...
Wednesday, 18 May 2022 - 00:45
AVR128Dx TWI as I2C Sniffer...
Since you are only interested in the writes, ignore the reads. A COMPTRANS+NACK command for an address not interested in, or an addressR, will simply wait for the next start...
Tuesday, 17 May 2022 - 20:54
Attiny406 I2C communication problem
But I wonder, is it just me not being a real programmer Yes, its you. That code is about as simple as it gets for twi. Learn to use functions, enums, static, etc., and when...
Tuesday, 17 May 2022 - 07:30
Comfused with AVR bootloader flash section
Another mistake I made- the function is not naked so a ret instruction is added (thus 6 bytes).   A problem will be that the linker will want to discard the jmp function, and...
Tuesday, 17 May 2022 - 06:55
Conversion Problems
You could deal with integers, and since sprintf is being used already use it for everything that needs conversions (if you use it once, may as well use it all the time)- https://...
Tuesday, 17 May 2022 - 06:10
Attiny406 I2C communication problem
Here is a twi driver for avr0/1/dx- https://github.com/cv007/Avr01Dx... its interrupt driven, but can also poll.   On an mcu I would avoid double,float,pow unless you know...
Tuesday, 17 May 2022 - 00:16
Comfused with AVR bootloader flash section
My mistake- a jmp is 2 words so need to allow more room- .bootloader_vector = 0xF000 .bootloader = 0xF002 or if doing some other way to jump to your bootloader, then allow...
Tuesday, 17 May 2022 - 00:07
Marcros with the register name inside
Macros/defines are a black hole that you cannot escape once you get too far in. Figure out how to use the c/c++ language to get what you want, its a better thing by far.  ...
Monday, 16 May 2022 - 19:24

Pages