Difference between revisions of "Multi-purpose Embedded System"
Jump to navigation
Jump to search
| Line 40: | Line 40: | ||
**Option 1: directly controlled by MCU | **Option 1: directly controlled by MCU | ||
**Option 2: indirectly through D-type flip-flops (e.g. [http://www.datasheetcatalog.org/datasheet/philips/74lv574.pdf 74LV154]) for low pin counts MCU | **Option 2: indirectly through D-type flip-flops (e.g. [http://www.datasheetcatalog.org/datasheet/philips/74lv574.pdf 74LV154]) for low pin counts MCU | ||
| − | ** Option 3: indirectly through shift register flip-flops (e.g. [http://www.datasheetcatalog.com/datasheets_pdf/M/7/4/H/M74HC165.shtml 74HC165] for input, [http://www.datasheetcatalog.org/datasheet/texasinstruments/tpic6595.pdf TPIC6595] or [http://www.datasheetcatalog.org/datasheet/philips/74HC_HCT595_CNV_3.pdf 74HC595] for output ) for extremely low pin count MCU | + | **Option 3: indirectly through shift register flip-flops (e.g. [http://www.datasheetcatalog.com/datasheets_pdf/M/7/4/H/M74HC165.shtml 74HC165] for input, [http://www.datasheetcatalog.org/datasheet/texasinstruments/tpic6595.pdf TPIC6595] or [http://www.datasheetcatalog.org/datasheet/philips/74HC_HCT595_CNV_3.pdf 74HC595] for output ) for extremely low pin count MCU |
| + | |||
==Software Architecture== | ==Software Architecture== | ||
| Line 56: | Line 57: | ||
Hardware | UART | ADC | DAC | NVM | PWM | ... | TIMERS | | Hardware | UART | ADC | DAC | NVM | PWM | ... | TIMERS | | ||
+------+-----+-----+-----+-----+-----+----------+ | +------+-----+-----+-----+-----+-----+----------+ | ||
| − | *The task scheduler is based on [http://www.freertos.org/ FreeRTOS] | + | *The task scheduler is based on [http://www.freertos.org/ FreeRTOS] incorporating coroutine developed by [http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html Simon Tatham]. The scheduler API is wrapped by the [http://www.die.net/doc/linux/man/man2/ POSIX] Thread API. |
**e.g. pthread_create(), usleep(), etc. | **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 [http://www.die.net/doc/linux/man/man2/ POSIX] System call API. | *Software drivers are developed to allow users at Application Level to use the hardware (e.g. ADC, DAC, UART, NVM etc) through the [http://www.die.net/doc/linux/man/man2/ POSIX] System call API. | ||
Revision as of 00:36, 12 February 2009
Contents
Hardware Architecture
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 communication with PC
- RS485 for longer distance communication (upto 1200m) over a set of devices
- 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 analog filters and op-amp circuits
- Use desktop software (e.g. FilterLab) to design circuits
- May incorporate digital filter to improve reduce noise
- Requires anti-aliasing analog filters and op-amp circuits
- DAC for analog control signals
- Refer to here if modulation is needed.
- 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 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 |
+-----------+-----------+----------+----------------+
TCP/IP Stack
+---------------------------------------------+--------------------+-------+
Applications | Ethernet Application | GUI Application | ... |
+--------+------+------+----------+------+----+ | |
Web Libraries | Web | DHCP | SNMP | DNS | SMTP |... | | |
| Server | | | Resolver | | | | |
+--------+------+------+----------+------+----+ | |
Socket API | Linux Socket Wrapper | | |
| +----------------------------------+ | |
TCP/IP Stack | | uip | | |
| +----------------------------------+ | |
| | Ethernet Thread | | |
| +---------------------------+------+--------------------+-------+
POSIX API | | POSIX System Calls | POSIX Threads |
+----------+---------------------------+-----------------------------------+
| Drivers | Task Scheduler |
+----------+---------------------------+-----------------------------------+
| H/W |
| TCP/IP |
| Stack |
+----------+
- See here for description
