Showing posts with label Microcontroller. Show all posts
Showing posts with label Microcontroller. Show all posts

Thursday, June 5, 2025

Exploring Edge AI with NXP's FRDM-MCXN947

I recently attended NXP technology day in Auckland, where the latest innovations from NXP were showcased - including their microcontrollers, i.MX microprocessors, and other advanced semiconductor technologies. NXP, a leading Dutch semiconductor company, designs and manufactures a wide array of products for automotive, industrial, and IoT applications. Among their latest developments is the MCX series of microcontrollers, which unifies the legacy Philips and Kinetis families into a new, modern MCU architecture.

What particularly caught my attention was the MCXN947 from the MCX N series. This device delivers high performance and low power consumption, while integrating a neural processing unit (NPU) to enable on-device AI processing. As computing increasingly moves to the edge, it's exciting to see compact, energy-efficient hardware like this supporting real-time AI workloads. NXP also hosted a hands-on machine learning session with the MCXN947, which inspired me to explore its potential as an edge AI platform.


Saturday, August 5, 2023

DIY USB Video Camera Using MK82FN256VLL15 Microcontroller and OV7670 Camera Module

FRDM-K82F is a low cost development board using MK82FN256VLL15 microcontroller. Here, I will test its FlexIO connector using OV7670 camera module. [NXP16, NXP16B]

Hardware

We need to solder 18 pin female connector, Header2x9, on the back of the FRDM-K82F board to connect OV7670 module as illustrated in the following figure.


Figure. FRDM-K82 attached with OV7670 camera module.


Wednesday, July 7, 2021

Saturday, March 28, 2020

Getting Started with FRDM-K64F

To use FRDM-K64F with the latest MCUXpresso IDE, you need to update the firmware for its debugger. It is similar to FRDM-K82F where the details can be seen at the following post.

http://cool-emerald.blogspot.com/2020/01/getting-started-with-frdm-k82f.html

There are only a few minor difference between FRDM-K64F and FRDM-K82F to get started. Therefore, I will only list some major points here.


Figure. FRDM-K64F board


Original OpenSDA appears as MBED drive. And it is not working with MCUXpresso. To update the firmware for its debugger,
  • Disable 'Windows storage services' ( https://os.mbed.com/blog/entry/DAPLink-bootloader-update/)
  • Hold reset button and connect the device to a USB port. It should now appear as a drive called BOOTLOADER
  • Drag and drop bootloader ‘0244_k20dx_bootloader_update_0x5000.bin’ into the drive.
  • Remove and reconnect without holding reset. Board shows as ‘MAINTANCE’.
  • Drag and drop Segger jLink OpenSDA for board specific firmware for K64F (‘02_OpenSDA_FRDM-K64F.bin’) which is available at https://www.segger.com/downloads/jlink#JLinkOpenSDABoardSpecificFirmwares
  • Remove and reconnect without holding reset button. It now appears as ‘FRDM-K64FJ’
  • To use JLink , open cmd and enter

    > cd "C:\Program Files (x86)\SEGGER\JLink"
    > JLink.exe -speed auto -device 'MK64FN1M0xxx12' -if SWD
    


  • At the JLink prompt

    J-Link> r
    J-Link> erase
    J-Link> q
    


  • After that, it should be OK to use MCUXpresso

Friday, January 10, 2020

Getting Started with FRDM-K82F

FRDM-K82F is a low cost development platform using MK82FN256VLL15 microcontroller. When I started using the board according to its getting started guide at

Get Started with the FRDM-K82F [NXP16],

I found out that its out-of-box demo is not running on my version of FRDM-K82F board. The insturctions on that page are also out of date. And, I could not get it worked.

After spending my time testing, browing the Internet, and experimenting, I found out that the following things might be necessary, in a brief, to make the board worked.
  • Debug adapter - update it
  • IDE - use MCUXpresso instead of Kinetis Studio
  • SDK - use MCUXpresso SDK Builder (make sure to 'drag and drop')
  • Flash - unlock the MCU's flash if required



Figure. FRDM-K82F board.


Saturday, August 11, 2018

DIY Programmable Function Generator Using Arduino Uno

It is possible to use Arduino Uno as a function generator to produce low frequency waveform. The advantage of the approach is the possibility of producing customized, complex, time varying waveform. On the down side, it cannot produce waveform with very high frequencies. To get smoother waveform, the PWM output frequency of pin 3 of Arduino Uno is increased to approximately 8 kHz. It is also possible to use DAC to achieve better results.


Figure. The output of Arduino function generator measured with an oscilloscope.


Tuesday, June 6, 2017

Flash content protection for LPC824

In this article, I would like to discuss about evaluation of LPC824 low cost 32-bit ARM Cortex-M0 microcontroller using OM13071 LPCXpresso824-MAX Development board. LPC824M201JHI33 is used in the board. Its size is only 5 x 5 x 0.85 mm in HVQFN package.

In order to evaluate it, MCUXpresso Integrated Development Environment (IDE) is downloaded and installed. Other tools for it can be found at this link . After launching MCUXpresso and assigning a workspace folder, example projects can be imported by clicking Quick Start Panel (near bottom left corner) -> Import projects from file system ... -> Browse LPC open resources as shown in the following figure.



Thursday, March 24, 2016

Gyroscope L3G4200D

L3G4200D is a MEMS ultra-stable three-axis digital output gyroscope made by STMicroelectronics. A L3G4200D Module in Aliexpress costs only about $3.


Figure. L3G4200 Gyroscope module


Friday, January 1, 2016

Mesh Bee - JN5168

Mesh Bee is a 2.4GHz wireless transceiver mady by seeed studio. It uses JN516x wireless chip from NXP. It is open hardware, open source. The IDE and tools from NXP are also free.

Wednesday, November 25, 2015

Tuesday, November 24, 2015

Wireless Communication using CC2530 Zigbee Wireless MCU

CC2530 is an system-on-chip (SoC) solution for IEEE 802.15.4 and Zigbee that combines RF transceiver and 8051 MCU. To develop a wireless module using it, we had bought a CC2530DK devolopment kit that consists of 2 CC2530EM Evaluation Modules, 2 SmartRF05EB Evaluation Boards, and a CC2531 USB Dongle. It cost about USD 400. At first, we installed SmartRF Studio which was available for free at TI's website.

CC2530DK

Saturday, September 19, 2015

Controlling Your Hardware from the Web Using Arduino

Using Arduino Ethernet shield 2 to control a hardware from the web is discussed. Arduino Ethernet 2 Library is used to implement in an Arduino Uno board as a server in an example as well as a client in an another example. The latest version Arduino IDE ( 1.7.6 in our case ) is used in the following examples. An Arduino Uno board with Ethernet shield 2 is shown below.


Figure. Arduino Uno paired with Arduino Ethernet shield 2.


Thursday, September 10, 2015

Accelerometer LIS3DSH

LIS3DSH is an 3-axis MEMS accelerometer made by STMicroelectronics. Its full scale range is selectable from ±2g to ±16g. The size is small and it is only 3mm x 3mm. Either SPI or I2C can be used to interface with it. Supply voltage is from 1.71 V to 3.6 V. In this article, testing and evaluation of STEVAL-MKI134V1 adapter board is discussed.


Figure. STEVAL-MKI134V1 - LIS3DSH adapter board for standard DIL24 socket.

Tuesday, August 4, 2015

Bluetooth Module to be Used with Microcontroller

HC-05 Master/Slave Bluetooth Module is a cheap (~SGD 16) and easy to use Bluetooth module with UART interface. Interfacing and using HC-05 with Arduino Uno microcontroller to control an LED light as commanded by a hand phone via Bluetooth communication is discussed in this post. In fact, any microcontroller with UART interface can be used with it.


Figure. HC-05 Bluetooth module with Arduino Uno.


HC-05 uses 3.3V for its digital logic pins while the voltage level for Arduino Uno is 5V. A bi-directional logic level converter can be used to interface them. But, here, we just use simple voltage dividers using readily available components in our labs to interface them as shown in the following diagram.

Figure. Interfacing HC-05 Bluetooth module with Arduino Uno.


To communicate this Bluetooth module from an Android phone, we can search and use any 'Bluetooth SPP' app in the Play store. We have used 'Bluetooh spp tools pro' by Jerry.Li. After opening the app and scanning for Bluetooth devices, you can connect HC-05 using '1234' as the pairing pin. Thereafter, characters sent to RX pin of HC-05 UART will be received by the phone and the characters sent by phone will be output from TX pin of UART of HC-05. If you connect the Bluetooth module using computer instead of the phone, a serial port will appear in your computer which can be used as a normal comm port sending and receiving data to and from the Bluetooth module.

#include <SoftwareSerial.h>
#define RxD 2
#define TxD 3
char recvChar;
SoftwareSerial blueToothSerial(RxD,TxD);
void setup()
{
    Serial.begin(9600);
    
    pinMode(RxD, INPUT);
    pinMode(TxD, OUTPUT);
    blueToothSerial.begin(9600);

    pinMode(13, OUTPUT);
}
void loop()
{  
  if(blueToothSerial.available())
  {
      recvChar = blueToothSerial.read();
      Serial.print(recvChar);
      if(recvChar == '1') digitalWrite(13, HIGH);
      else if(recvChar == '0') digitalWrite(13, LOW);
  }
  if(Serial.available())
  {
      recvChar  = Serial.read();
      blueToothSerial.print(recvChar);
  }
}


This Arduino program forwards the characters sent by phone to the serial monitor and vice versa. It turns on or off the LED which is connected to the pin 13 of Arduino Uno microcontroller board when 1 or 0 is sent from the phone. The push button on HC-05 Bluetooth module needs to be pressed to send AT commands and to configure it.

Figure. Sending and receiving characters to and from the Bluetooth app using Serial monitor.


Another Bluetooth module called Bluetooth Shield is also tested. That module is designed for Arduino Uno and can be directly fixed on the Arduino Uno board. Therefore, no additional interfacing or connection is needed to make it work. But you need to make sure that the jumper settings are correct. As shown in the following figure, the jumper for HBT_TX is connected to D2 pin of the Arduino Uno board and HBT_RX is connected to D3. Therefore, D2 needs to be configured as RX pin and D3 as TX pin respectively in the demo program which is available at Bluetooth Shield Wiki page. You can define Bluetooth device name and pairing pin in that example program.

Figure. Bluetooth Shield.


Thursday, March 6, 2014

Reading Rotary Encoder Using Microcontroller

Rotary encoders are commonly used for measuring angular position or motion sensing. An optical encoder has a disc with a pattern of cutouts. As the disc rotated, an LED light that shines on photo detector is turned on and off accordingly to produce a digital waveform.

An optical encoder produced by VEX Robotics Design System

Gray code is normally used in encoders instead of ordinary binary code to prevent glitches. In Gray code, the number of changing bits between successive numbers is only 1. The following table shows 2 bit Gray code from 0 to 3.

Monday, July 8, 2013

CAN bus

CAN bus (controller area network) is a vehicle bus standard designed to allow microcontrollers and devices to communicate with each other. CAN bus is a message-based protocol, designed specifically for automotive applications but now also used in other areas such as aerospace, industrial automation and medical equipment. The advantages of CAN bus compared to RS232 communication are as follows.

Friday, June 28, 2013

Using Analog to Digital Converter of AT89C51CC01 Microcontroller

Using AT89STK-06 starter kit, I have written a few C code to read an analog to digital converter (ADC) input of AT89C51CC01 which is an 8051 microcontroller. It has 8 multiplexed ADC inputs with 10 bit resolution. As an example, ADC input pin 7 which is connected to a variable resister is read.