Project introduction
This is a manual to Prosthetic Device Communication Protocol (PDCP) designed by Yves Losier and implemented as Master Thesis project by
Andrzej Zamojski (TU of Lodz, Poland)
and
Andreas Nordal (NTNU in Trondheim, Norway).
Supervisor of both of them was Øyvind Stavdahl (Cybernetic Department, NTNU)
To date PDCP was implemented only on PIC microcontrollers, what is the result of interface development. To spread idea of standardized interface for prosthetics main idea of that project was to implement PDCP protocol on AVR platform which is widely used in prosthesis industry.
Team of Andreas and Andrzej divided protocol implementation into 2 parts:
- Hardware Abstraction Layer ( HAL ) - designed by Andrzej Zamojski (mail)
- High Level Layer ( HLL ) - designed by Andreas Nordal
Task of HAL layer is to provide transparency of hardware for higher layers of interface. Designers of
higher layers of PDCP should not take care (as far as it`s not needed) of any aspects of hardware (like port initialization, interrupt routines responsible for communication with CAN controller and others). Parts of the code, which should be refreshed by application designer, are specially described.
Task of HLL layer is to provide all functionalities of PDCP protocol like procedure of binding and functions.
Important functionalities
The most importan functionalities provided by designed interface was shortly described on the pages:
Hardware resources
Hardware resources used for protocol implementation are:
- AT90USB1287 - High Performance, Low-Power AVR 8-bit microcontroller with 128 kB of ISP Flash;
- MCP2515 - Microchip CAN controller;
- MCP2551 - Microchip CAN transceiver.
Above presented hardware was combined into one PCB and designed by O.J.Borgersen and
M.L.Volstad as USB Multifunction Board-Nimron and is used in programming courses at NTNU. More details can be found in the Internet
Software platform
Software was designed using AVR Studio version 4.19 and JTAGICE mkII debugger.
Name convention
To facilitate software development following name convention was used within the project:
- CONFIG_name - Both HAL and HLL contain part of software dedicated to special functionalities, which either are used only for debugging or for some configuration. To facilitate the use of the software compilation and running of the part of the code can be manually enables or disabled by changing #define preprocessor directives. All the directives which are related to bus device mode or define debugging modes begin with the prefix CONFIG_;
- HW_name - HAL of interface, in contrast to the HLL, contains low level hardware initialization. To improve portability all ports relevant for proper operation of HAL are signed with HW_ prefix. These directives should be absolutely refreshed after the microcontroller exchange;
- hal_name - Function responsible for interface between lower and higher layer of PDCP from hardware point of view are signed with HAL_ prefix;
- hll_name - Function responsible for interface between lower and higher layer of PDCP from upper software point of view are signed with HLL_ prefix.