Shop OBEX P1 Docs P2 Docs Learn Events
SOLVED - Some I2C chips not detected by Taqoz Reloaded? — Parallax Forums

SOLVED - Some I2C chips not detected by Taqoz Reloaded?

bob_g4bbybob_g4bby Posts: 440
edited 2022-02-19 19:19 in Forth

"It's quiet - maybe too quiet, pardner" I expect all you 1000's of Taqoz programmers are too busy coding to post anything recently.

I'm coding a driver for the MS5611 air pressure sensor - it's said to be good for altimeter applications. I already had 3 i2c chips connected to the P2 and they all show up as a list when Taqoz starts. When an MS5611 is added, Taqoz does not detect it. Anyone else had an i2c chip fail to be detected?

I have two of these chips on breakout boards. I can read the six calibration constants from each chip - each chip has a unique set and they read consistently, so the chips are connected up and working OK.

Comments

  • I wish TAQOZ had that level of active users. That would be really fantastic but...to the point.

    I have not experienced that. A chip not recognized correctly - yes, but not detected - not yet.
    I have a sensor board from ST - yet untouched - so I may give it a try today once i get home. Will post the results.

  • An update without an actual results. :(

    It turned out I was unable to check the sensor board due to the fact my KISS board loaded with TAQOZ (@"Christof Eb." version patched for the 25Mhz crystal) apperently does not like minicom terminal on my linux box and returns garbage. The board boots fine but I suspect it's the linux character encoding that is causing the problem. Will check tomorrow with the TeraTerm on windows.

  • @maciek, I am using minicom on Linux with the KISS board with no issues at all. Silly question, did you set the baud speed in minicom conf (or start minicom with -b parameter) ?

  • Silly question indeed :). The KISS board and the TAQOZ are both functioning perfectly.Yes, the serial terminal settings are correct. Moreover, I have checked on windows with Tera Term - no issues. Everything works as it should. The characters display properly and all is well. I will investigate further during the weekend.

  • bob_g4bbybob_g4bby Posts: 440
    edited 2022-02-20 17:53

    A good friend suggested this modified version of the 'lsi2c' word that:-
    1. Successfully detects the MS5611 chip
    2. Displays an estimated maximum i2c clock speed for each chip detected on the bus
    3. Recognises a few more chips and displays their names

    --- Modified lsi2c - 19th Feb 2022
    
    pri DEV?    1 SWAP FOR CASE@ I2C.START I2C.WR 0= i2C.STOP 25 us $FE I2CRD AND NEXT ;
    
    pri .I2C ( adr8 -- )
            SWITCH  \ AT i2cdev C!
            100 I2C.KHZ $FF I2CRD I2C.STOP
    ---     Check for ack and exit if none
            CASE@  I2C.START I2C.WR 0= I2C.STOP 5 us I2C.STOP 0EXIT
    ---     Print the address on a new line
            CRLF+ CASE@ .B
            100
            6000 200 DO I I2C.KHZ 
            3 DEV? 11 COG@ 0<> AND IF 100 + ELSE LEAVE THEN 50 us 100 +LOOP
            100 I2C.KHZ     TAB PRINT PRINT" kHz" TAB TAB
    \       CR TAB TAB TAB
    ---     and try to identify it
    pri (.I2C)
            \ SWITCH
            $36 CASE 0 SFR@ DROP $B5 SFR@ $36 = IF PRINT" P2D2 UB USB+SUPPORT  UUID:" .UUID THEN BREAK
    ---     Could be RTC but check ID register in case this is not a P2D2
            $A4 CASE 0 RTC@ DROP $28 RTC@ $33 = IF PRINT" RV-3028 RTC  "  RDRTC 100 us .FDT THEN BREAK
            $DE CASE PRINT" MCP79410 RTC " BREAK
            $1A CASE PRINT" QMC5883 Magnetic Field Sensor" BREAK
            CASE@ $A0 $AE WITHIN IF .EEPROM BREAK
            CASE@ $C0 $CE WITHIN IF PRINT" Si5351A Clock Generator" BREAK
            CASE@ $D0 $DC WITHIN IF PRINT" DS3231 compatible RTC" BREAK
            $EC CASE PRINT" BMP280 Pressure Sensor or MS5611 Pressure Sensor with pin CSB=1" BREAK
            $EE CASE PRINT" MS5611 Pressure Sensor with pin CSB=0" BREAK
            CASE@ $30 $3E WITHIN IF PRINT" MCP9808 Temperature Sensor" BREAK
            CASE@ $40 $4E WITHIN IF PRINT" I/O Expander" BREAK
            PRINT" UNKNOWN DEVICE"
            ;
    
    pub lsi2c       
            CRLF PRINT" I2C DEVICES" CRLF
            PRINT" Address  Max clock   Identity"
            I2C? 
            IF 
                128 FOR 
                        I 2* .I2C 
                    NEXT
                CRLF
            THEN ;
    
    
Sign In or Register to comment.