Hexadecimal

Member Since: February 14, 2015

Country: United States

  • Are there any full terms and conditions relating to the selling of widgets anywhere?

  • I will not be using a full arduino board with this, I will instead be using a bare atting85 or 84 I read that the buffer length should be shortened due to smaller RAM size so I changed:

    ifndef twi_h

    define twi_h

    #include <inttypes.h>

    //#define ATMEGA8

    #ifndef TWI_FREQ #define TWI_FREQ 100000L #endif

    #ifndef TWI_BUFFER_LENGTH #define TWI_BUFFER_LENGTH 32 //note this is the value I changed

    endif

    #define TWI_READY 0 #define TWI_MRX 1 #define TWI_MTX 2 #define TWI_SRX 3 #define TWI_STX 4

    void twi_init(void); void twi_setAddress(uint8_t); uint8_t twi_readFrom(uint8_t, uint8_t*, uint8_t, uint8_t); uint8_t twi_writeTo(uint8_t, uint8_t*, uint8_t, uint8_t, uint8_t); uint8_t twi_transmit(const uint8_t*, uint8_t); void twi_attachSlaveRxEvent( void ()(uint8_t, int) ); void twi_attachSlaveTxEvent( void (*)(void) ); void twi_reply(uint8_t); void twi_stop(void); void twi_releaseBus(void);

    endif

    To this:

    ifndef twi_h

    define twi_h

    #include <inttypes.h>

    //#define ATMEGA8

    #ifndef TWI_FREQ #define TWI_FREQ 100000L #endif

    #ifndef TWI_BUFFER_LENGTH #define TWI_BUFFER_LENGTH 6 //note this is what I changed it to

    endif

    #define TWI_READY 0 #define TWI_MRX 1 #define TWI_MTX 2 #define TWI_SRX 3 #define TWI_STX 4

    void twi_init(void); void twi_setAddress(uint8_t); uint8_t twi_readFrom(uint8_t, uint8_t*, uint8_t, uint8_t); uint8_t twi_writeTo(uint8_t, uint8_t*, uint8_t, uint8_t, uint8_t); uint8_t twi_transmit(const uint8_t*, uint8_t); void twi_attachSlaveRxEvent( void ()(uint8_t, int) ); void twi_attachSlaveTxEvent( void (*)(void) ); void twi_reply(uint8_t); void twi_stop(void); void twi_releaseBus(void);

    endif

    Should this small edit make this compatible with the attiny? The file changed is located in arduino\libraries\wire\utility/twi (header file) I kept a copy of the original in case this has messed anything up.

  • Is this in any way compatible with a bare attiny programmed in the arduino IDE?

  • Has anyone here programmed an Attiny84 (an external one) using this? Also is the programmer compatible with atmel studio?

No public wish lists :(