You are currently viewing How to Interface Wi-Fi with LPC2148 ARM

How to Interface Wi-Fi with LPC2148 ARM

Spread the love


The ARM7 LPC2148 Primer board is specifically designed to help students to master the required skills in the area of embedded systems. The kit is designed in such a way that all the possible features of the microcontroller will be easily used by the students. The kit supports in-system programming (ISP) which is done through the serial port.

NXP’s ARM7 (LPC2148), ARM Primer Kit is proposed to smooth the progress of developing and debugging of various designs encompassing High-speed 32-bit Microcontrollers.

Wi-Fi

Wi-Fi is a popular technology that allows an electronic device to exchange data wirelessly (using radio waves) over a computer network, including high-speed Internet connections

Interfacing Wi-Fi

Fig. 1 shows how to interface the Wi-Fi with the microcontroller. The Wi-Fi module continuously transmits or receives serial data (RS232 protocol) through the internet without wires. It delivers the received data and receives the data to be transmitted to and from a host system through a host controller interface (HCI). The most popular host controller interface today is either a UART or a USB. Here, I will only focus on the UART interface; it can easily show how a Bluetooth module can be integrated on to a host system through a UART connection.

Interfacing Wi-Fi with LPC2148

Transmit or Receive data over internet with LPC2148 Primer Board by using Wi-Fi module through UART0. The message communication is done in internet or mobiles using Wi-Fi module through MAX232 into the SBUF register of LPC2148 microcontroller (refer serial interfacing with LPC2148). The serial data from the Wi-Fi receiver is taken by using the Serial Interrupt of the controller. The UART0 pin lines are used to transmit & receive operations in LPC2148 Primer Board.

Pin Assignment with LPC2148

Circuit Diagram to Interface Wi-Fi with LPC2148

Source Code

The Interfacing Wi-Fi module with LPC2148 program is very simple and straight forward, which send or receive a message in LPC2148 Primer Board through Wi-Fi module by using UART0. Some delay is occurring when a single data is transmitted or received through UART0. C programs are written in Keil software. The baud rate of microcontroller is 9600.

To compile the C code you need the KEIL software. They must be properly set up and a project with correct settings must be created in order to compile the code. To compile the above code, the C file must be added to the project.

In Keil, you want to develop or debug the project without any hardware setup. You must compile the code for generating HEX file. In debugging Mode, you want to check the port output without LPC2148 Primer Board.

The Flash Magic software is used to download the hex file into your microcontroller IC LPC2148 through UART0.

Testing the Wi-Fi with LPC2148

Give +3.3V power supply to LPC2148 Primer Board; connect the +5V adapter with Wi-Fi module which is connected with the LPC2148 Primer Board. There are two Wi-Fi modules are required. One is connected with LPC2148 Primer Board; other one is connected with PC.

First connect the serial cable between LPC2148 Primer board & PC. Then open the Hyper Terminal screen, select which port you are using and set the default settings. Now the screen should show some text messages. If the messages are correctly displayed in Hyper Terminal, then only connect the Wi-Fi modules in LPC2148 Primer Board UART0 & PC.

If you are not reading any data from UART0, then you just check the jumper connections & just check the serial cable is working. Otherwise, you just check the code with debugging mode in Keil. If you want to see more details about debugging just see the videos in the below link.

General Information

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.