I2c monitor

From emboxit
Revision as of 16:51, 11 September 2015 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Download and build the project

in my laptop
F:\opt\WORKSPACES\keil_arm\lpc17xx.cmsis.driver.library\Examples\I2C\Monitor\Keil
or in other computer:
...\lpc17xx.cmsis.driver.library\Examples\I2C\Monitor\Keil
  • info for project on
  • abstract.txt, inside the project directory
  • Available for both KEIL and IAR
  • Built successfully 400px
With Keil uVision V4.14.4.0 free version


Testing

  • With mbed:
600px



  • Source changed for I2C1 instead I2C0
  • mbed pin10=SCL1 destroys SCL line of Arduino:
Pulls high
  • Next test:
Use LPCxpresso board
use unchanged source
Pins for I2C0 are available




Hardware setup

For I2C0:
  • SDA -> P0.27
  • SCL -> P0.28



Hex to bin

For mbed programing a .bin file is needed, so we have to convert the .hex produced from compiler to .bin

Python intelhex

  • Alexander Belchenko's
  • YES IT WORKS
like python :)
  • Worked from command prompt:
But not from freeCommander
python intelhex.py i2c_monitor.hex 
  • Windows system variable PYTHONPATH had to be set to:
C:\PYTHON27;C:\PYTHON27\DLLs;C:\PYTHON27\LIB;C:\PYTHON27\LIB\LIB-TK
as advised here


File:I2cmonitor-5.jpg


axf to bin

arm-none-eabi-objcopy

  • tested:
From both command prompt and from inside codered
Produces too large file, something is wrong
  • Keil produces .hex and .axf
  • To create .bin for use with mbed a comversion needed
arm-none-eabi-objcopy -O binary example.axf example.bin


  • batch file created and tested

File:I2cmonitor-2.jpg

File:I2cmonitor-3.jpg

Keil

  • tested fromelf
Asks FLEXLM license file


Keil hex2bin

  • not tested

It is old, Have to check if works with ARM