Wireless Networks Lab - PowerPoint PPT Presentation

About This Presentation
Title:

Wireless Networks Lab

Description:

Access functions and structures used by the application to interact with the ... After comprehending the usage of UART, you are asked to ... – PowerPoint PPT presentation

Number of Views:349
Avg rating:3.0/5.0
Slides: 10
Provided by: csNct
Category:

less

Transcript and Presenter's Notes

Title: Wireless Networks Lab


1
Wireless Networks Lab UART
  • 2007/10/24

2
Environment
  • BoardAPI
  • vLedControl(0, true)
  • HardwareAPI
  • vAHI_xxx( )
  • FontalBSP
  • FontalButton -- btn_init()
  • FontalLED -- led_init()
  • Stack 802.15.4 MAC
  • Application Queue API
  • Service Access Point AppApi.h
  • Access functions and structures used by the
    application to interact with the Jennic 802.15.4
    stack
  • u32AppApiInit ()
  • E_AHI_DEVICE_SYSCTRL, E_AHI_DEVICE_UART0, , and
    etc.

3
Sample
  • The PCs UART connects to the on-chip UART of the
    FT6250 Kit. This sample code can let us figure
    out how to communicate between them with UART.
  • HardwareAPI
  • u8UartPort E_AHI_UART_0 or E_AHI_UART_1
  • u8BaudRate 38400

vAHI_UartEnable(E_AHI_UART_0) vAHI_UartReset(E_AH
I_UART_0, TRUE, TRUE) vAHI_UartReset(E_AHI_UART_0
, FALSE, FALSE) vAHI_UartSetClockDivisor(E_AHI_U
ART_0, u8BaudRate) vAHI_UartSetControl(E_AHI_UART
_0, FALSE, FALSE,
E_AHI_UART_WORD_LEN_8, TRUE, FALSE)
4
Overview
Terminal
Serial Port
Typing in HyperTerminalex aaaaabbbcc
FT 6250
UART
which UART
ASCII code
  • Connecting the sensor board to a PC using the
    programming cable.
  • UART settings are in Appendix.

5
Flowchart
6
Pseudo code
  • u32AHI_Init()
  • u32AppApiInit(NULL, NULL, NULL, NULL, NULL,
    NULL)
  • Set up UART
  • Init LED
  • Register UART Callback
  • Utility function
  • vUartPrint()
  • vByteToString()

7
Requirement
  • Review
  • After comprehending the usage of UART, you are
    asked to
  • When typing in the terminal, you should control
    each of the LEDs on/off through UART.
  • When pressing each button of FT device, you
    should get different feedback in your terminal
    through UART.

8
Bonus
  • Implement a small game.

Terminal
Serial Port

UART_0
UART_1
FT6250
FT 6251
UART_1
9
Appendix
  • When using HyperTerminal, you should choose the
    serial port you used and configure the serial
    connection as follows 38400 bps, 8 data bits, no
    parity, 1 stop bit, and no handshaking.
  • Ensure that your HyperTerminal is started after
    powering up the FT device.
Write a Comment
User Comments (0)
About PowerShow.com