Robust Low-Power MSP430 Networking with a Buffer Insertion Ring

About This Presentation
Title:

Robust Low-Power MSP430 Networking with a Buffer Insertion Ring

Description:

Auto and other vehicle data & control. LIN commonly used. Industrial process control ... Stop blinking for one minute if any error is detected. Source code on web ... –

Number of Views:39
Avg rating:3.0/5.0
Slides: 20
Provided by: marke162
Category:

less

Transcript and Presenter's Notes

Title: Robust Low-Power MSP430 Networking with a Buffer Insertion Ring


1
Robust Low-Power MSP430 Networking with
aBuffer Insertion Ring
  • Glen Worstell
  • Sugle Consulting
  • worstell_at_copper.net
  • More info
  • www.worstell.com

2
Agenda
  • Application areas for small networks
  • Common small network solutions
  • The Buffer Insertion Ring network
  • Protocol
  • MSP430 Hardware
  • MSP430 Software
  • Comparison of BIR with other solutions
  • Description of BIR demonstration code
  • QA

3
Small network applications
  • Auto and other vehicle data control
  • LIN commonly used
  • Industrial process control
  • Lab data collection
  • Home automation
  • Medical data collection
  • HVAC

4
Common Micro Networks
  • CAN
  • Multi-Master
  • 1Mbps
  • 8 Byte Messages
  • LIN
  • Master-Slave (sort of)
  • 20K bps
  • 8 Byte Messages
  • BIR
  • Multi-Master
  • 50K bps
  • 8 Byte Messages
  • Home-grown RS-485

5
Why BIR?
  • Extremely low idle power
  • Isolated (with isolated power supply)
  • Lowest cost, esp. in small quantities
  • Uses available hardware (UART)
  • Low EMI generation
  • Low EMI susceptibility
  • Multi-master
  • Can use with other micros (but not low power)

6
Why not BIR?
  • Cant disable interrupts for very long
  • But could use 2nd MSP430
  • Requires Xtal
  • But could use LIN-like scheme
  • 1 Byte latency per node
  • About 1 Msec per node at 10K baud

7
BIR Concept
  • Unique node numbers
  • Node sends message (to all other nodes) whenever
    necessary
  • Asynchronous serial node transceivers
  • Built-in UART
  • Bit-Bang (F1121)
  • 4-Wire Cable (RJ-11?)
  • Power, Ground
  • Balanced pair BIR data
  • 2 to 32 nodes
  • Optical Isolators

8
BIR message format
9
Transceiver Hardware
10
9-bits/byte Message Format
  • Address Byte
  • Node Number of Sender (5 bits)
  • Number of Data Bytes (2 bits)
  • Parity (1 bit)
  • Data Byte (8 bits)
  • Extra Data Bytes (8 bits each)
  • Checksum (8 bits, like LIN or CRC-8)

11
Number of Data Bytes Coding
  • 0 One Data Byte
  • 1 Two Data Bytes
  • 2 Four Data Bytes
  • 3 Eight Data Bytes

12
Insertion Buffer Idea
  • Each node has a buffer
  • Incoming data goes in buffer
  • To Send
  • If buffer is empty, put message into buffer
  • Otherwise, wait until it is empty
  • Messages from other nodes are passed on
  • Messages from this node are not passed
  • A note about baud rate divisors
  • If small n, n should be odd

13
BIR software flowchart
14
The Three-node Demo
  • Each node sends to a random other node
  • Sending occurs at random intervals
  • Random message turn on LED or turn off LED
  • Stop blinking for one minute if any error is
    detected
  • Source code on web
  • Uses simple RTOS and Random number generator

15
Demo photo
  • BIR demo - 2 HW UART, 1 Timer-A UART

16
An RTOS for limited RAM
  • Single Stack
  • Cooperative
  • Standard C
  • See Salvo for similar scheme
  • Source code on web
  • www.worstell.com

17
Basic RTOS idea
  • Suspend only from Main()
  • Nothing is on the stack
  • Need to save only the return address
  • See ProtoThreads, Adam Dunkels,
    www.sics.se/adam/pt/

18
A good PRNG without hardware multiply
  • Poor PRNGs are very common
  • Feedback shift registers
  • arithmetic modulo a power-of-2
  • Random Number Generators - Good Ones are Hard to
    Find
  • Park ,SK KW Miller, CACM, Oct. 1998
  • X(n1) (AX(n)B) mod M
  • Multiplicative, Congruential Random-Number
    Generators with Multiplier - 2K1 - 2K2 and
    Modulus 2P - 1, Pei Chi Wu, ACM Trans. On
    Mathematical Software, June 1977

19
QA
  • Email worstell_at_copper.net
  • More info, source code www.worstell.com
Write a Comment
User Comments (0)
About PowerShow.com