Realizing the Internet of things – teaches you how to connect mbed lpc114fn28 into axeda!

Source: Internet
Author: User
Tags get ip

Project description

This tutorial will show you how to connect mbed lpc114fn28 to the Axeda service for the Internet of Things!

Mbed Lpc1114fn28

Cooperation platform: switch-science

The mbed lpc1114fn28 needs to run at 48MHz CPU frequency. Lpc1114fn28 has up to 32KB of flash storage space, up to 4KB of data storage space, a fast-change Mode I²c bus interface, a rs-485/eia-485 UART interface, a SPI interface with SSP, 4 Universal counters/timers, A 10-bit ADC with 22 general-purpose I/O pins.

Note: LPC1114FN28 does not support RTOs due to the size limit of flash. Please do not bring the Mbed-rtos library into your project.

The mbed Lpc1114fn28 has very limited storage space and no network connectivity. In addition, the LPC114EN28 does not support RTOS and Ethernet interfaces.

If you want to connect this board to Axeda (an Internet of things cloud service), what do we do?

The answer is Wiz550io.


The Wiz550io is an automatically configured Ethernet controller module that contains a W5500 (embedded full hardware TCP/IP chip TCP/IP and PHY), a transformer and a RJ45. Supports SPI (main interface). Therefore, even if the primary system does not have an Ethernet interface or a TCP/IP software protocol stack (included in the RTOs), the primary system can easily be connected to the network.


http://developer.mbed.org/components/WIZ550io/

Software connection:mbed lpc1114fn28 + wiz550io

    • Wiz550io: Ethernet Connection
Pin Name Lpc1114fn28 Direction Wiz550io
Miso Dp1 J1:3
Sck Dp6 - J1:5
SCs Dp26 - J1:6
Rstn Dp25 - J2:3

    • Potentiometer:
Pin Name Lpc1114fn28 Direction Potentiometer
Analogin Dp13 <- 2 (out)

Software –axedago-mbednxp + w5500interface

1. Enter AXEDAGO-MBEDNXT

    • Click and enter this program: axedago-mbednxp
    • Change the platform to mbed Lpc1114fn28. The software has been made for LPC1768. Because we're going to use LPC1114FN28, you have to choose Lpc1114en28 in the compiler.

2. Remove the Ethernet and Mbed-rtos interfaces on the Axedago-mbednxp_wiz550io

3. Inlet W5500 Interface

    • Click and enter this program: W5500 interface

4. Porting main.cc: For Wiz550io, Ethernet interface initialization. The following changes need to be made:

#if defined (target_lpc1114) SPI SPI (DP2, DP1, DP6); Mosi, miso, sclk ethernetinterface eth (&AMP;SPI, DP25, DP26);    SPI, CS, reset Analogin pot1 (dp13); #else ethernetinterface eth;    Analogin pot1 (P19); Analogin Pot2 (P20); #endif * Analogin Port should also be configured based on the platform type. Axeda1. Reference: Axeda Go kit/website link for mbed NXP LPC1768 Prototype version:http://developer.axeda.com/Instructions/axeda-go-kit-mbed-NXP-LPC1762. Instrument panel on the Axeda
    • Click "Axeda Ready"
    • Select Mbed LPC1768 and type the device name
    • Copy string number
    • Enter the string number (main.cc) in the code
1 Char *serial_num = "serialnumber";

Enjoy the fun of Lpc1114fn24 + Wiz550io in Axeda

Click the "Compile" button at the top of the page and download the. bin file on your platform.

    • Serial terminal log: Check your DHCP IP address, potentiometer value, through the serial terminal to send debugging information.

Initializing Ethernet

-Ethernet Ready

Ethernet.connecting

-Connecting returned 0

Trying to get IP address:

-IP address:192.168.13.53//&lt;-dhcp IP address

Sending value for WELL1 0.00//&lt;-potentiometer Value

Received chars from server://sending message

http/1.1 200

content-lengtved chars from server:

http/1.1 200

content-length:0

Sending value for WELL1 0.14//&lt;-potentiometer value

Received chars from server://sending message

http/1.1 200

content-length:0

Sending Value for WELL1 0.27

Received chars from server:

http/1.1 200

content-length:0

Sending Value for WELL1 0.29

Received chars from server:

http/1.1 200

Content-length:0<span style= "Font-family:georgia, ' Times New Roman ', ' bitstream Charter ', times, serif; font-size:16px; line-height:1.5; Background-color: #ffffff; " >

</span>

    • Axeda Development Toolbox: Your mbed is now connected to the Axeda Toolbox account.
    • Open the mbed gadget in your dashboard

    • In the data item, the potentiometer value from Lpc1114fn24 + Wiz550io can be checked through the line graph.

Comparison of LPC1768 and mbed lpc1114fn28 on Axeda

As shown, LPC1768 (using the RTOs) occupies a 66.8KB size flash space. Is LPC1114 & Wiz550io occupies twice times more than 20.8KB.

Get code

http://developer.mbed.org/users/embeddist/code/AxedaGo-mbedNXP_WIZ550io/

Realizing the Internet of things – teaches you how to connect mbed lpc114fn28 into axeda!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.