Sub TWIStop()
TWCR = 0b10010100 ' TWINT|TWSTO|TWEN
End Sub
It would be better to use the constants TWINT, TWSTO and TWEN in the code ?
I tried my poor avr assembler, gcb scripts, ... found nothing else that was not ultra bloat.
Anybody has a idea on how to do that ?
Erdy
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Send me a personal messages and we can join two projects together. I started this on Monday. 😃. I have two init working so far. This should take a few days to sort.
The goal is to provide TWI in the planned release.
Perfect timing.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I must be a nut, I can't find a way to send you a personal message ! Help(Help) :-)
I have a 'elementary' working TWI include file and there is no secret about it, I can post it here, except it's not 'finished', for now it only scans the I2C address but it's only a matter of time :-).
Erdy
BTW, I can find nothing on this forum : quote/code/... :-)
PS : OK, I Found the big blue button up rigth in your profile
Last edit: Erdy 2015-02-21
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a replacement HWI2C.H that now supports AVR and TWI communcations.
Testing has been completed with successful results, thank you everyone. The revised HWi2C.h file supports the GCB HWI2C command set and this means that you can change the chip type with no changes to the IC2 or TWI command set.
Testing has included mega8, 168 and 328p with regression testing with 16f1938 and 16f1939.
If you want this file before the release then personal message me. Why? I am awaiting a code review with Hugh before releasing to SourceForge.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
Playing with the TWI/I2C Harwdare of AVR ATMEGA328P (Arduino Pro Mini).
Here is the only short way found to translate the following C code to GCB
C code for TWIStop
GCB code :
It would be better to use the constants TWINT, TWSTO and TWEN in the code ?
I tried my poor avr assembler, gcb scripts, ... found nothing else that was not ultra bloat.
Anybody has a idea on how to do that ?
Erdy
Perfect timing.
Send me a personal messages and we can join two projects together. I started this on Monday. 😃. I have two init working so far. This should take a few days to sort.
The goal is to provide TWI in the planned release.
Perfect timing.
I must be a nut, I can't find a way to send you a personal message ! Help(Help) :-)
I have a 'elementary' working TWI include file and there is no secret about it, I can post it here, except it's not 'finished', for now it only scans the I2C address but it's only a matter of time :-).
Erdy
BTW, I can find nothing on this forum : quote/code/... :-)
PS : OK, I Found the big blue button up rigth in your profile
Last edit: Erdy 2015-02-21
😊
I am integrating into HWI2C.H so we can port directly from a Microchip to AVR microcontroller.
I am back home on Sunday my time so I can work on this.
For anyone following this thread.
I have a replacement HWI2C.H that now supports AVR and TWI communcations.
Testing has been completed with successful results, thank you everyone. The revised HWi2C.h file supports the GCB HWI2C command set and this means that you can change the chip type with no changes to the IC2 or TWI command set.
Testing has included mega8, 168 and 328p with regression testing with 16f1938 and 16f1939.
If you want this file before the release then personal message me. Why? I am awaiting a code review with Hugh before releasing to SourceForge.
Latest status.
Code is stable on long term tests and I have implemented assembler to improved Master mode performance.
Send me a PM if you can test please.
Hello,
Best solution found to translate this C Code :
Is to use GCB AVR inline assembler
Erdy
Last edit: Erdy 2015-02-27