Difference between revisions of "Multi-purpose Embedded System"

From OpenCircuits
Jump to navigation Jump to search
Line 1: Line 1:
 
==Hardware Architecture==
 
==Hardware Architecture==
 
[[Image:Mpes hw archi.png]]
 
[[Image:Mpes hw archi.png]]
*MCU
+
 
**MCU can be 8-bit/16-bit/32-bit
+
===MCU===
**MCU should have sufficient RAM (i.e. no external RAM required)
+
*MCU can be 8-bit/16-bit/32-bit
**MCU should have program Flash (i.e. no external program flash required)
+
*MCU should have sufficient RAM (i.e. no external RAM required)
*Data Memory
+
*MCU should have program Flash (i.e. no external program flash required)
**Use serial bus (I2C/SPI) to expand data memory to save I/O pins
+
 
**Need a file system to access the data
+
 
**EEPROM for small block of re-writable data
+
===Data Memory===
**Flash for large block of re-writable data
+
*Use serial bus (I2C/SPI) to expand data memory to save I/O pins
*Communication
+
*Need a file system to access the data
**RS232 for short distance one-to-one communication with PC
+
*EEPROM for small block of re-writable data
**RS485 for longer distance networked communication
+
*Flash for large block of re-writable data
**USB for USB communication with PC
+
 
**Ethernet for Internet connectivity
+
 
**GPIB for automated test equipment
+
===Communication===
*User Interface
+
*RS232 for short distance one-to-one communication with PC
**Graphical displays (LCD, VFD, etc.)
+
*RS485 for longer distance networked communication
**Keypad for input
+
*USB for USB communication with PC
*Sensory Control
+
*Ethernet for Internet connectivity
**ADC for analog feedback signals
+
*GPIB for automated test equipment
**DAC for analog control signals
+
 
**GPIO for digital feedback and control signals
+
 
 +
===User Interface===
 +
*Graphical displays (LCD, VFD, etc.)
 +
*Keypad for input
 +
 
 +
 
 +
===Sensory Control===
 +
*ADC for analog feedback signals
 +
**Requires anti-aliasing filters and op-amp circuits
 +
*DAC for analog control signals
 +
*GPIO for digital feedback and control signals
  
  
Line 80: Line 90:
 
                   +--------------------------------------+-----------------------------------+
 
                   +--------------------------------------+-----------------------------------+
 
*See [http://www.opencircuits.com/Ethernet_Module here] for description
 
*See [http://www.opencircuits.com/Ethernet_Module here] for description
 +
 +
 +
===File System===
 +
 +
 +
===Remote Access===

Revision as of 18:37, 26 November 2008

Hardware Architecture

Mpes hw archi.png

MCU

  • MCU can be 8-bit/16-bit/32-bit
  • MCU should have sufficient RAM (i.e. no external RAM required)
  • MCU should have program Flash (i.e. no external program flash required)


Data Memory

  • Use serial bus (I2C/SPI) to expand data memory to save I/O pins
  • Need a file system to access the data
  • EEPROM for small block of re-writable data
  • Flash for large block of re-writable data


Communication

  • RS232 for short distance one-to-one communication with PC
  • RS485 for longer distance networked communication
  • USB for USB communication with PC
  • Ethernet for Internet connectivity
  • GPIB for automated test equipment


User Interface

  • Graphical displays (LCD, VFD, etc.)
  • Keypad for input


Sensory Control

  • ADC for analog feedback signals
    • Requires anti-aliasing filters and op-amp circuits
  • DAC for analog control signals
  • GPIO for digital feedback and control signals


Software Architecture

RTOS

               +-----------+-----------+----------------------------------------------+
 Application   |  Task 1   |  Task 2   |    ...                                       |
               +-----------+-----------+------------+----------------------+----------+
 Standard API  |          POSIX System Call         |     POSIX Thread     |  C-Lib   |
               +------------------+-----------------+----------------------+----------+
   Kernel      | Power Management |                 |    Task Scheduler    |
               +------------------+                 +----------+-----------+ 
               |               Drivers              | FreeRTOS | Coroutine |
               +------+-----+-----+-----+-----+-----+----------+-----------+
   Hardware    | UART | ADC | DAC | NVM | PWM | ... |  TIMERS  | 
               +------+-----+-----+-----+-----+-----+----------+
  • The task scheduler is based on FreeRTOS V4.1.3 incorporating coroutine developed by Simon Tatham. The scheduler API is wrapped by the POSIX Thread API.
    • e.g. pthread_create(), usleep(), etc.
  • Software drivers are developed to allow users at Application Level to use the hardware (e.g. ADC, DAC, UART, NVM etc) through the POSIX System call API.
    • e.g. open(), write(), read(), ioctl(), lseek(), etc.
  • The most up-to-date development can be found at repository freertos_posix


GUI

                      +---------------+----------------+
 User Applications    | Application 1 | Application 2  |
                      |               +----------------+------------------+
   Middlewares        |               |    Toolkits    |  Window Manager  |
                      +---------------+----------------+------------------+
   GUI Library        |            Graphics Engine (inc Font)             |
                      +-----------+----------------------+----------------+
   POSIX API          |           |  POSIX System Calls  | POSIX Threads  |
                      |           +-----------+----------+----------------+
 Drivers & Scheduler  |  Display  |  Pointer  |  Keypad  | Task Scheduler |
                      +-----------+-----------+----------+----------------+
  • See here for description


TCP/IP Stack

                  +---------------------------------------------+--------------------+-------+
 Applications     |            Ethernet Application             |  GUI Application   |  ...  |
                  +--------+------+------+----------+------+----+                    |       |
 Web Libraries    |  Web   | DHCP | SNMP |   DNS    | SMTP |... |                    |       |
                  | Server |      |      | Resolver |      |    |                    |       |
                  +--------+------+------+----------+------+----+                    |       |
 Socket API       |              Linux-like Socket              |                    |       |
                  +---------------------------------------------+                    |       |
 TCP/IP Stack     |                   uip                       |                    |       |
                  +---------------------------------------------+                    |       |
                  |             Ethernet Controller             |                    |       |
                  +--------------------------------------+------+--------------------+-------+
 POSIX API        |           POSIX System Calls         |            POSIX Threads          |
                  +--------------------------------------+-----------------------------------+
                  |               Drivers                |            Task Scheduler         |
                  +--------------------------------------+-----------------------------------+
  • See here for description


File System

Remote Access