Resource icon

Examples for STM32 2014-01-04

Status
Not open for further replies.

Val Gretchev

Member
Forum Supporter
Val Gretchev submitted a new article:

Examples for STM32 - Examples to get you started with MikroElektronika MINI-M4 for STM32 development board.


Read more about this article...
 
Hi Val,

Thanks for the very useful information and code for the STM32 MINI-M4. I am currently working on a project that uses a LTC2943 Coulomb Counter (I2C) and the STM32 MINI-M4. I need to implement a data logger and acquire register data from the LTC2943. I'm rather new to the STM32 and not sure how to approach this project. Do you have any suggestions on how to implement this project?

Thanks,
Jim
 
Hi Jim

I assume you already have the STM32 MINI-M4 board and a compiler from Mikroelektronika. The problem now is to attach the LTC2943 chip to the MINI-M4 board. This isn’t an easy task since the LTC2943 comes in an 8-DFN package that is only 3mm by 3mm. The cost of the chip is $5.00 US which is quite reasonable. However, you will probably need to make a PCB to contain it and that is another level of complexity. As an alternative to building your own PCB, you could purchase the LTC2943 development board from Digi-Key but the cost is $50.25 US. See…

https://www.digikey.com/product-sea...monstration-boards-and-kits/2622039?k=LTC2943


To attach the LTC2943 to the MINI-M4 board use PB10 for SCL and PB11 for SDA. The ALCC pin can be connected to one of the interrupt inputs on the MINI-M4 (OC4, PC5, PA8, or PC9).

Start your programming tests using the Mikroelektronika library for I2C. There are many examples on their website for driving I2C interfaces for their click boards. If that doesn’t work with this chip, you may have to write your own driver.

Let me know of your progress.

Val
 
Hi Val,

A test board has been made which includes the STM32 MINI-M4 and LTC2943 placed and connected as you have described (SCL to PB10, SDA to PB11, and ALCC to PA8). I have the compiler from Mikroelektronika and will check out the library for I2C. The main problem for me is how to log the data on a laptop. Would you suggest a UART serial connection to a laptop or a USB connection?

Jim
 
Hi Jim

My example includes the USB driver module that can be used to transfer data from your board to the laptop. However, you have to write the program for the laptop that understands the protocol and assemble the data into a format that can be displayed and stored on the hard drive. In order to do that, you need a compiler for the laptop working in the language you are familiar with. I myself use Delphi 7 and find it very easy to program my applications. I have, on occasion, used C# but tend to forget the constructs since I don’t use it often enough.

Val
 
Hi Val,

Thanks for the reminder on your USB driver module. I may try Python for the code on the laptop. Thanks again for your help.

Jim
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…