Jump to content

aBUGSworstnightmare

Members
  • Content Count

    41
  • Joined

  • Last visited


Reputation Activity

  1. Like
    aBUGSworstnightmare got a reaction from dollop in SSD1308 I2C OLED - Stellaris driver API   
    Hi there,
     
    I have written a driver API for SSD1308 based I2C OLEDs (can be used with SSD1306 too with no/only minor changes in the initialization routine) which I will use for my C3ii INS Stellaris Booster Pack (http://e2e.ti.com/group/microcontrollerprojects/m/msp430microcontrollerprojects/664688.aspx).
     
    The driver is comparable to the 'Simple Display' example from the EVALBOT.
     
    The API relies on my Stellaris I2C driver which you can find here: http://forum.stellarisiti.com/topic/417-i2c-with-stellaris-lm4f120h5qr-working-driver-api-example-code/ or here http://e2e.ti.com/support/microcontrollers/stellaris_arm_cortex-m3_microcontroller/f/473/t/235926.aspx .
     
    The API allows displaying:
    1.) Images (black&white)

     
     
    The image needs to be a black&white .BMP-Image file which must be converted into a data array for use with the API. A little programm called 'LCDAssistent' is included in the attached .zip file which can be used for this task. LCDAssistant is ease to use and also allows inclusion of the image size into the output array. Refer to the file 'logos.h' for examples (original .bmp-file is included too). 
     
    2.) Centered Text

     
    If the supplied text is to large to fit the screen it will be clipped left and right.
     
    3.) Strings

     
    The string will be printed 'until space lasts'! That means: you can't supply a string that is to long.
     
     
    4.) It makes use of an undocumented SSD1306/1308 command called 'Double-Size-Font' (0xD6). 
    After receiving this command, the SSD1308 OLED controller displays  each scan line of the first 4 text lines twice. This is resulting in a font which is 2 pages large.

     
     
    Using the 0xD6 command will not affect/alter the content of the SSD1308 GDDRAM! When in 'Double-Size-Font'-Mode, the 'Set Display Start Line' command is used to display the pages PAGE4 to PAGE7.
      Step1: Initial display content  

    Step 2: Double-Size-Font-Mode switched ON
     
     

    Step 3: Display start line set to 0x32 (start of PAGE4)
     

    Step 4: Double-Size-Font Mode switched OFF and Display Start Line set back to 0x40 (beginning of the PAGE1)
     
    The display shown/used is a 0.96in 128x64pixels white OLED from WIDE.Hk. Here's the link to the product page: http://www.wide.hk/products.php?product=I2C-0.96%22-OLED-display-module-%28-compatible-Arduino-%29
     
    EDIT (01/18/2012):
    Added a new version of my I2C OLED API! The r03-release includes some new functions:
     
     
    // Clears a partial row on the OLED display.
    void Display128x64x1ClearArea(unsigned long ulI2CBase, unsigned long ulXStart, unsigned long ulXEnd, unsigned long ulY)
     
     
    // Displays a length-restricted string on the OLED display at the current cursor position.
    void Display128x64x1StringCurrentPos(unsigned long ulI2CBase, const char *pcStr, unsigned long ulLen)
     
     
    // Set the Cursor to the specified position on the OLED display (GDDRAM address).
    void Display128x64x1SetCursor(unsigned long ulI2CBase, unsigned long ulX, unsigned long ulY)
     
     
    // A simple I2C based printf function supporting \%c, \%d, \%p, \%s, \%u, \%x, and \%X for use with OLED displays.
    void I2COLEDprintf(const char *pcString, ...)
     
     
    Please report any issues/improvements!
     
     
    Enjoy your OLEDs!
    Kind regards
    aBUGSworstnightmare
    I2C OLED 128x64 - API_r03.zip
  2. Like
    aBUGSworstnightmare got a reaction from bluehash in I2C tests - Linker errors   
    Hi,
     
    seems you're missing some include files! But, I doubt that anybody will be able to help you without additional information.
     
    By the way: There's a polled I2C master driver available here in the forum (http://forum.stellarisiti.com/topic/417-i2c-with-stellaris-lm4f120h5qr-working-driver-api-example-code/
    ) and, TI just released an interrupt based I2C master as part of the BOOSTXL-SENSHUB (http://www.ti.com/tool/boostxl-senshub) software package (http://www.ti.com/tool/sw-ek-tm4c123gxl).
     
    Rgds
    aBUGSworstnightmare
  3. Like
    aBUGSworstnightmare got a reaction from bluehash in BOOSTXL-SENSHUB - Latest booster pack from TI   
    Hi bluehash,
     
    Yes, I've designed it for use with the Evalbot (search E2E for 'Evalbot Design Files' to find the thread). It was the 'birth' of the C3ii idea.
     
    It uses a SIRFSTAR IV GPS which should connect to MEMS (Gyro, Mag) which allows Sensor Data fusion in the GPS.
    Unfortunately, Quectel has no MEMS support to date ;-(
     
    Nevertheless, this tiny GPS module (L50) is very sensitive and fast.
     
    aBUGSworstnightmare
  4. Like
    aBUGSworstnightmare got a reaction from bluehash in BOOSTXL-SENSHUB - Latest booster pack from TI   
    Hi there,
     
    just received my BOOSTXL-SENSHUB and only wanted to show you what's in the box
     
    aBUGSworstnightmare
     

    The box
     

    The boosterpack mounted on a Stellaris Launchpad
     

    I've added a GPS I've once made for use with the EVALBOT
     

    The stack from the side. The GPS uses the RF-interface connectors. They allow easy addition of I2C/UART/SPI devices
  5. Like
    aBUGSworstnightmare got a reaction from oPossum in BOOSTXL-SENSHUB - Latest booster pack from TI   
    Hi there,
     
    just received my BOOSTXL-SENSHUB and only wanted to show you what's in the box
     
    aBUGSworstnightmare
     

    The box
     

    The boosterpack mounted on a Stellaris Launchpad
     

    I've added a GPS I've once made for use with the EVALBOT
     

    The stack from the side. The GPS uses the RF-interface connectors. They allow easy addition of I2C/UART/SPI devices
  6. Like
    aBUGSworstnightmare got a reaction from bluehash in Stellaris LaunchPad IMU.   
    Hi,
     
    don't know if you've seen this: http://www.ti.com/tool/boostxl-senshub - the Sensor-Hub Booster Pack.
     
    The hardware resembles and IMU too, but, what makes this a precious gem - is the software that comes with it: a set of functions to deal with the sensors, and a 9 axis sensor fusion code (and a nice I2C driver which uses interrupts!).
     
    Don't miss this! Will save you a lot of work!
     
    aBUGSworstnightmare
  7. Like
    aBUGSworstnightmare got a reaction from bluehash in C3ii - high-performance GPS-Aided Inertial Navigation System (INS) Booster Pack   
    Yes, shouldn't be a problem when using the same pinheaders as features on the Launchpad itself. Since I have an still unpopulated PCB lying around I will test if it is possible to solder the Launchpad directly to the C3ii INS PCB and then plug the sensor BP ontop of that. Depends on the lenght of the Launchpad pins.
     
    In every case the C3ii will not be populated with the sensors!
     
    Well, since we know have a interrupt I2C API and a good set of code to deal with the sensors itself (part of the SW-EK-TM4C123GXL - http://www.ti.com/tool/sw-ek-tm4c123gxl ) it should speed up the SW development.
     
    Will have to re-write my OLED code   to work with the new I2C master API (unfortunately, no I2C slave routines were enclosed).
     
    aBUGSworstnightmare
  8. Like
    aBUGSworstnightmare reacted to RobG in StellarLight - Stellaris LaunchPad based controller   
    Here's how to use it with WS2811
     
     
       
    And here's why I have 4 color buttons, 4 color gradient
     

  9. Like
    aBUGSworstnightmare got a reaction from Jigar4Electronics in newbie question! how do I use UARTprintf with floats?   
    Hi, 
     
    or do it like this and stay with UARTprintf only. 
     
    aBUGSworstnightmare
     
    //***************************************************************************** // //! \brief Float to ASCII //! //! Converts a floating point number to ASCII. Note that buf must be //! large enough to hold //! //! \param f is the floating point number. //! \param buf is the buffer in which the resulting string is placed. //! \return None. //! //! \par Example: //! ftoa(3.14) returns "3.14" //! // //***************************************************************************** void ftoa(float f,char *buf) { int pos=0,ix,dp,num; if (f<0) { buf[pos++]='-'; f = -f; } dp=0; while (f>=10.0) { f=f/10.0; dp++; } for (ix=1;ix<8;ix++) { num = (int)f; f=f-num; if (num>9) buf[pos++]='#'; else buf[pos++]='0'+num; if (dp==0) buf[pos++]='.'; f=f*10.0; dp--; } }
  10. Like
    aBUGSworstnightmare got a reaction from bluehash in Stellaris LaunchPad IMU.   
    The GUI is Part of the MSP430 AHRS Application Note.
     
    @PentuimPC: Did you port the AHRS sensor Fusion algorithm from the App Note too?
     
    aBUGSworstnightmare
  11. Like
    aBUGSworstnightmare got a reaction from gwdeveloper in I2C Slave - Burst Mode - LM3S2965   
    ... that's because there is no Burst Mode for slaves available !
     
    Your 'slave' needs to examine it's status by calling 'I2CSLAVEStatus()' (either by polling or by using an interrupt (!)) to determine if the master requested a send or receive operation. Depending on the type of operation request you can call 'I2CSlaveDataPut()' or 'I2CSlaveDataGet()'.
     
    Since you need to send send 13bytes of data you will end up with 13 'I2CSlaveDataPut()' operations.
     
    My LM4F120H5QR Users manual gives me this flowchart for Slave operation:

     
    Should be similar for your Lm3S device.
     
    aBUGSworstnightmare 
     
  12. Like
    aBUGSworstnightmare got a reaction from Rickta59 in I2C Slave - Burst Mode - LM3S2965   
    ... that's because there is no Burst Mode for slaves available !
     
    Your 'slave' needs to examine it's status by calling 'I2CSLAVEStatus()' (either by polling or by using an interrupt (!)) to determine if the master requested a send or receive operation. Depending on the type of operation request you can call 'I2CSlaveDataPut()' or 'I2CSlaveDataGet()'.
     
    Since you need to send send 13bytes of data you will end up with 13 'I2CSlaveDataPut()' operations.
     
    My LM4F120H5QR Users manual gives me this flowchart for Slave operation:

     
    Should be similar for your Lm3S device.
     
    aBUGSworstnightmare 
     
  13. Like
    aBUGSworstnightmare got a reaction from bluehash in I2C Slave - Burst Mode - LM3S2965   
    ... that's because there is no Burst Mode for slaves available !
     
    Your 'slave' needs to examine it's status by calling 'I2CSLAVEStatus()' (either by polling or by using an interrupt (!)) to determine if the master requested a send or receive operation. Depending on the type of operation request you can call 'I2CSlaveDataPut()' or 'I2CSlaveDataGet()'.
     
    Since you need to send send 13bytes of data you will end up with 13 'I2CSlaveDataPut()' operations.
     
    My LM4F120H5QR Users manual gives me this flowchart for Slave operation:

     
    Should be similar for your Lm3S device.
     
    aBUGSworstnightmare 
     
  14. Like
    aBUGSworstnightmare got a reaction from Feroze in I2C Slave - Burst Mode - LM3S2965   
    Hi,
     
    so, LM3S2965 will act as a I2C slave. right?
    Then you should have a look at the example 'slave_receive_interrupt' which is located in the example folder of your Stellarisware package (Stellarisware/examples/peripherals/i2C/).
     
    aBUGSworstnightmare
  15. Like
    aBUGSworstnightmare got a reaction from Terenceang in newbie question! how do I use UARTprintf with floats?   
    Hi, 
     
    or do it like this and stay with UARTprintf only. 
     
    aBUGSworstnightmare
     
    //***************************************************************************** // //! \brief Float to ASCII //! //! Converts a floating point number to ASCII. Note that buf must be //! large enough to hold //! //! \param f is the floating point number. //! \param buf is the buffer in which the resulting string is placed. //! \return None. //! //! \par Example: //! ftoa(3.14) returns "3.14" //! // //***************************************************************************** void ftoa(float f,char *buf) { int pos=0,ix,dp,num; if (f<0) { buf[pos++]='-'; f = -f; } dp=0; while (f>=10.0) { f=f/10.0; dp++; } for (ix=1;ix<8;ix++) { num = (int)f; f=f-num; if (num>9) buf[pos++]='#'; else buf[pos++]='0'+num; if (dp==0) buf[pos++]='.'; f=f*10.0; dp--; } }
  16. Like
    aBUGSworstnightmare got a reaction from timotet in CCS license expired... now what?   
    Hi, 
     
    buy a Stellaris Launchpad, have a look at the wiki 'DEBUG OUT' http://processors.wiki.ti.com/index.php/Stellaris_LM4F120_LaunchPad_Debug_How_To and save some bucks!
     
    aBUGSworstnightmare
  17. Like
    aBUGSworstnightmare got a reaction from bluehash in newbie question! how do I use UARTprintf with floats?   
    Hi, 
     
    or do it like this and stay with UARTprintf only. 
     
    aBUGSworstnightmare
     
    //***************************************************************************** // //! \brief Float to ASCII //! //! Converts a floating point number to ASCII. Note that buf must be //! large enough to hold //! //! \param f is the floating point number. //! \param buf is the buffer in which the resulting string is placed. //! \return None. //! //! \par Example: //! ftoa(3.14) returns "3.14" //! // //***************************************************************************** void ftoa(float f,char *buf) { int pos=0,ix,dp,num; if (f<0) { buf[pos++]='-'; f = -f; } dp=0; while (f>=10.0) { f=f/10.0; dp++; } for (ix=1;ix<8;ix++) { num = (int)f; f=f-num; if (num>9) buf[pos++]='#'; else buf[pos++]='0'+num; if (dp==0) buf[pos++]='.'; f=f*10.0; dp--; } }
  18. Like
    aBUGSworstnightmare got a reaction from bluehash in SSD1308 I2C OLED - Stellaris driver API   
    Well, I doubt that they will get cheaper! Shipping is not that expensive (and was really fast last time), so I think I will order some to play with in the near future.
     
    @ all of you! WATCH THIS SPACE FOR AN UPDATE ON MY OLED API!!!!
     
    Here are some lines of code for you to think about:
        ...
        uccount = 170;
        Display128x64x1SetCursor(I2CTELEMETRIEBUS, 20, 0);
        I2COLEDprintf("uccount = %4d", uccount);
        Display128x64x1SetCursor(I2CTELEMETRIEBUS, 0, 1);
        I2COLEDprintf("uccount = 0x%x", uccount);
        ...
     
    And this is the result which you'll see on the OLED:
     

     
    Yes, you're right! 'I2COLEDprintf()' is very similar to the C library 'fprintf()' function. Here's an excerpt from the comments:
    ...
    //! A simple I2C based printf function supporting \%c, \%d, \%p, \%s, \%u,
    //! \%x, and \%X for use with OLED displays.
    ...
    //! - \%c to print a character
    //! - \%d or \%i to print a decimal value
    //! - \%s to print a string
    //! - \%u to print an unsigned decimal value
    //! - \%x to print a hexadecimal value using lower case letters
    //! - \%X to print a hexadecimal value using upper case letters 
    //! - \%p to print a pointer as a hexadecimal value
    //! - \%\% to print out a \% character
    //!
    //! For \%s, \%d, \%i, \%u, \%p, \%x, and \%X, an optional number may reside
    //! between the \% and the format character, which specifies the minimum number
    //! of characters to use for that value; if preceded by a 0 then the extra
    //! characters will be filled with zeros instead of spaces.  For example,
    //! ``\%8d'' will use eight characters to print the decimal value with spaces
    //! added to reach eight; ``\%08d'' will use eight characters as well but will
    //! add zeroes instead of spaces.
     
     
    Rgds
    aBUGSworstnightmare 
  19. Like
    aBUGSworstnightmare got a reaction from abecedarian in SSD1308 I2C OLED - Stellaris driver API   
    Well, I doubt that they will get cheaper! Shipping is not that expensive (and was really fast last time), so I think I will order some to play with in the near future.
     
    @ all of you! WATCH THIS SPACE FOR AN UPDATE ON MY OLED API!!!!
     
    Here are some lines of code for you to think about:
        ...
        uccount = 170;
        Display128x64x1SetCursor(I2CTELEMETRIEBUS, 20, 0);
        I2COLEDprintf("uccount = %4d", uccount);
        Display128x64x1SetCursor(I2CTELEMETRIEBUS, 0, 1);
        I2COLEDprintf("uccount = 0x%x", uccount);
        ...
     
    And this is the result which you'll see on the OLED:
     

     
    Yes, you're right! 'I2COLEDprintf()' is very similar to the C library 'fprintf()' function. Here's an excerpt from the comments:
    ...
    //! A simple I2C based printf function supporting \%c, \%d, \%p, \%s, \%u,
    //! \%x, and \%X for use with OLED displays.
    ...
    //! - \%c to print a character
    //! - \%d or \%i to print a decimal value
    //! - \%s to print a string
    //! - \%u to print an unsigned decimal value
    //! - \%x to print a hexadecimal value using lower case letters
    //! - \%X to print a hexadecimal value using upper case letters 
    //! - \%p to print a pointer as a hexadecimal value
    //! - \%\% to print out a \% character
    //!
    //! For \%s, \%d, \%i, \%u, \%p, \%x, and \%X, an optional number may reside
    //! between the \% and the format character, which specifies the minimum number
    //! of characters to use for that value; if preceded by a 0 then the extra
    //! characters will be filled with zeros instead of spaces.  For example,
    //! ``\%8d'' will use eight characters to print the decimal value with spaces
    //! added to reach eight; ``\%08d'' will use eight characters as well but will
    //! add zeroes instead of spaces.
     
     
    Rgds
    aBUGSworstnightmare 
  20. Like
    aBUGSworstnightmare got a reaction from abecedarian in SSD1308 I2C OLED - Stellaris driver API   
    Hi there,
     
    I have written a driver API for SSD1308 based I2C OLEDs (can be used with SSD1306 too with no/only minor changes in the initialization routine) which I will use for my C3ii INS Stellaris Booster Pack (http://e2e.ti.com/group/microcontrollerprojects/m/msp430microcontrollerprojects/664688.aspx).
     
    The driver is comparable to the 'Simple Display' example from the EVALBOT.
     
    The API relies on my Stellaris I2C driver which you can find here: http://forum.stellarisiti.com/topic/417-i2c-with-stellaris-lm4f120h5qr-working-driver-api-example-code/ or here http://e2e.ti.com/support/microcontrollers/stellaris_arm_cortex-m3_microcontroller/f/473/t/235926.aspx .
     
    The API allows displaying:
    1.) Images (black&white)

     
     
    The image needs to be a black&white .BMP-Image file which must be converted into a data array for use with the API. A little programm called 'LCDAssistent' is included in the attached .zip file which can be used for this task. LCDAssistant is ease to use and also allows inclusion of the image size into the output array. Refer to the file 'logos.h' for examples (original .bmp-file is included too). 
     
    2.) Centered Text

     
    If the supplied text is to large to fit the screen it will be clipped left and right.
     
    3.) Strings

     
    The string will be printed 'until space lasts'! That means: you can't supply a string that is to long.
     
     
    4.) It makes use of an undocumented SSD1306/1308 command called 'Double-Size-Font' (0xD6). 
    After receiving this command, the SSD1308 OLED controller displays  each scan line of the first 4 text lines twice. This is resulting in a font which is 2 pages large.

     
     
    Using the 0xD6 command will not affect/alter the content of the SSD1308 GDDRAM! When in 'Double-Size-Font'-Mode, the 'Set Display Start Line' command is used to display the pages PAGE4 to PAGE7.
      Step1: Initial display content  

    Step 2: Double-Size-Font-Mode switched ON
     
     

    Step 3: Display start line set to 0x32 (start of PAGE4)
     

    Step 4: Double-Size-Font Mode switched OFF and Display Start Line set back to 0x40 (beginning of the PAGE1)
     
    The display shown/used is a 0.96in 128x64pixels white OLED from WIDE.Hk. Here's the link to the product page: http://www.wide.hk/products.php?product=I2C-0.96%22-OLED-display-module-%28-compatible-Arduino-%29
     
    EDIT (01/18/2012):
    Added a new version of my I2C OLED API! The r03-release includes some new functions:
     
     
    // Clears a partial row on the OLED display.
    void Display128x64x1ClearArea(unsigned long ulI2CBase, unsigned long ulXStart, unsigned long ulXEnd, unsigned long ulY)
     
     
    // Displays a length-restricted string on the OLED display at the current cursor position.
    void Display128x64x1StringCurrentPos(unsigned long ulI2CBase, const char *pcStr, unsigned long ulLen)
     
     
    // Set the Cursor to the specified position on the OLED display (GDDRAM address).
    void Display128x64x1SetCursor(unsigned long ulI2CBase, unsigned long ulX, unsigned long ulY)
     
     
    // A simple I2C based printf function supporting \%c, \%d, \%p, \%s, \%u, \%x, and \%X for use with OLED displays.
    void I2COLEDprintf(const char *pcString, ...)
     
     
    Please report any issues/improvements!
     
     
    Enjoy your OLEDs!
    Kind regards
    aBUGSworstnightmare
    I2C OLED 128x64 - API_r03.zip
  21. Like
    aBUGSworstnightmare got a reaction from ji231 in Stellaris Launchpad, OLED and BMP085   
    Hi,
     
    excellent! Great to the the I2C API being used already!
     
    Doing i.e.:
     
    #define BMP085I2CPORT    I2C0_MASTER_BASE
     
    ...
     
    I2CRegWrite(BMP085I2CPORT, BMP085_ADDR, BMP085_CTRL_REG, BMP085_TEMP_REG); .... 
     
    will result in an easy to re-use code (once your I2C interface needs to be changed).
     
    aBUGsworstnightmare
     
    P.S. Find the original Bosch Sensortec BMP085 API enclosed! 
    API_BMP085.zip
  22. Like
    aBUGSworstnightmare got a reaction from bluehash in I2C with Stellaris LM4F120H5QR - working driver API example code   
    Hi Pny,
     
    yes, I've thought about implementing both modes. But since they need a somewhat different handling/setup, I didn't implement both modes in the first release of the API.
     
     
     
     
    Hi Wojtek,
     
    well, I need to say that I didn't tested this (simply because I don't have a I2C device at hands that needs a 16-bit address), but it should be possible to do it like this:
     
    1.) You should define a new union data type that holds the memory address. Your new data type should give you the possibility to access the address as 16bit int (for ease of use) and as 2 chars.
    I.e. like this:
     
    /* ============================================================================
    // union to convert integer to two unsigned char or vice versa
    // ADDRESS        : 16-bit (integer) address
    // LOWBYTE        : lowbyte of integer value
    // HIGHBYTE       : highbyte of integer value
    // ==========================================================================*/
      union SPLITINTTOBYTE
      {
        unsigned int ADDRESS;
        struct //SPLIT
        {
          unsigned char LOWBYTE;
          unsigned char HIGHBYTE;
        }SPLIT;
      };
     
    Maybe you need to change the position of the LOW/HIGH-Byte in the structure because of the Stellaris memory organization. The code above is tested and verified on MSP430!
     
    Now that you have a new data type available, you can define a new variable which represents the EEPROM address:
     
    // union of type SPLITINTTOBYTE which hold the 16bit EEPROM memory address
    static union SPLITINTTOBYTE uat24c32;
     
    2.) You need a local (or global) buffer array were you store the data which you want to write to the EEPROM or were read from the EEPROM. 
    I.e.:
    // array stores data to write to/read from EEPROM
     
    char EEPROMValues[32] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00, 0x00};
     
    3.) Using this in the application:
     
    Lets assume:
    - The AT24C32 is connected to I2C0
    - The I2C-device address is 0b101000 = 0x50 (A2 to A0 tied to GND)
    - You want to write the following sequence of data to the EEPROM (more than one byte of data --> page write): 0x01, 0x02, 0x03, 0x04, 0xAA
    - The data should be written to page no 100 (the AT24C32 has 128 pages a 32bytes each = 4096 * 8 bit = 32K --> the start address for your data write should be 0x0C80 (if I calculated right)
     
    With these assumptions your code should look like:
    ...
    // initialize memory address for EEPROM data write
    uat24C32.ADDRESS = 0x0C80;
     
    // prepare data buffer
    // the EEPROM uses 16bit addressing. Since the High-Byte of the address is part of the 'I2CWriteData' API-function, the first 'data byte' to transfer needs to be the Low-Byte of the address, followed by 'real' data bytes
    // get low byte of address from the union
    EEPROMValues[0] = uat24C32.SPLIT.LOWBYTE;
    // prepare data to be written
    EEPROMValues[1] = 0x01;
    EEPROMValues[2] = 0x02;
    EEPROMValues[3] = 0x03;
    EEPROMValues[4] = 0x04;
    EEPROMValues[5] = 0xAA;
     
    I2CWriteData(I2C0_MASTER_BASE, 0x50, uat24C32.SPLIT.HIGHBYTE, EEPROMValues, 6);
    ...
     
    I need to think a little more about reading from the EEPROM, but I would try to see if the following approach works:
     
    // initialize memory address for EEPROM data write
    uat24C32.ADDRESS = 0x0C80;
     
    // prepare the buffer for transfer
     
    // get low byte of address from the union
    EEPROMValues[0] = uat24C32.SPLIT.LOWBYTE;
     
    // do a dummy write to the EEPROM to set the memory address to 0x0C80
    I2CWriteData(I2C0_MASTER_BASE, 0x50, uat24C32.SPLIT.HIGHBYTE, EEPROMValues, 1);
     
    // don't know if this works! Hopefully the dummy byte 0x00 gets ignored by the EEPROM and reading starts. 
     
    I2CReadData(I2C0_MASTER_BASE, 0x50, 0x00, EEPROMValues, 5);
    ...
     
    If this will not work you can write your own extension to the routines to deal with 16-bit addresses.
     
    Rgds
    aBUGSworstnightmare
  23. Like
    aBUGSworstnightmare got a reaction from bluehash in C3ii - high-performance GPS-Aided Inertial Navigation System (INS) Booster Pack   
    Hi, 
    another short update on the driver API for the C3ii INS:
    Drawing simple 'bitmaps' is done but I'm not quite satisfied with the routines. I think I will post them in the Stellaris sharing forum/code vault section here by the end of the week (at the latest).
    By the way: any idea/recommendation how to re-write/modify UARTStdio to print on the OLED?
     
    Rgds
    aBUGSworstnightmare
     

     

    P.S. Scan the qr-code ;-)
  24. Like
    aBUGSworstnightmare got a reaction from RobG in C3ii - high-performance GPS-Aided Inertial Navigation System (INS) Booster Pack   
    Hi,

    just wanted to give you a sneak preview of my Stellaris Launchpad Booster Pack - the C3ii!
     


    When all the software is in place it will resemble an high-performance GPS-Aided Inertial Navigation System (INS) that combines MEMS inertial sensors, a high-sensitivity GPS receiver and a Bluetooth Class1 communications interface. The main objective for the C3ii is using it as a multirotor flight controller!

    Some details on the 'guts' of my new creation:

    - some TI components for voltage level translation and power supply (Vin < 26V)
    - Invensens MPU-9150 9-axis motion tracking device (contains a 3-axis gyroscope, 3-axis accelerometer, 3-axis magnetometer and an onboard Digital Motion Processor)
    - Measurement Specialties MS5611-01BA03 24-bit barometric pressure sensor (primary pressure sensor)
    - Bosch Sensortec BMP180 barometric pressure sensor (secondary pressure sensor)
    - Globaltop Technology PA6C GPS Module with high sensitivity (-165 dBm), 66 Channels, running at 10Hz update rate
    - Roving Networks RN-41 Class 1 Bluetooth Module (for short/medium range communication)
    - microSD-card socket for Data Logging etc.
    - anti-vibration mounts integrated into the PCB
    - some undisclosed options

    The Stellaris Launchpad will be connected to the bottom of the C3ii.
    Initial testings were fine but some more were needed to prove the design. If everything works fine I'm willing to offer the C3ii to the community (PCB only, maybe I will include a stencil). So, if somebody is interested in please let me know!

    Kind regards
    aBUGSworstnightmare
  25. Like
    aBUGSworstnightmare got a reaction from bluehash in C3ii - high-performance GPS-Aided Inertial Navigation System (INS) Booster Pack   
    Well, since the MPU-9150 is a little beast - I think I will proceed with the GPS routines next (UART driver and NEMA decoding routines).
     
    (a basic) I2C driver for the MPU-9150 should be an easy job since all routines are in place and ready to go. Maybe I will work on both (and display the related data on one of the OLEDs each).
     
    I need to take a look on the example code of the EK-LM4F232 and the EVALBOT again to see if I can use their microSD card driver (the card is connected to SSI0 on the C3ii Booster Pack).
×
×
  • Create New...