Introduction & Technical Background:
The purpose of the course is to get familiarized with the micro-processor programming and interfacing. Number of internal registers and port registers inputs to implement different testing. One can interface external devices, internal calculations, implement different protocols and a lot of 1-pin controls. There are 4 serial interfaces available; one can communicate with a number of devices using them. Some synchronous ports are also available. There is also I2C and state-of-the-art, the USB port. One can imagine the power of the device by these features.
William Shakespeare said, “Practice makth the man perfect.” Lab exercises are the practices that made us able much to seek the power of this IC named as AXIS ETRAX 100LX.
Different type of the lab experiments gives hands-on experience to program the very device with more ease and in less time. The bit sequence in registers programs different components of the processor to communicate, control and monitor the peripherals attached. Serial port programming, synchronous port communication, I2C, and the USB are most powerful part of the device. The ALU helps in different arithmetic & logical procedures. Parallel port programming helps in controlling and monitoring the pins and thus the device attached. Serial port programming enables to communicate with the serial enabled devices. The I2C helps in communication in I2C enabled devices. I2C is a good address-mode (I2C bus device access) protocol. It is very effective in communication with memory-devices to access the register values.
To get the knowhow of the programming and the flashing procedure of the embedded platform, one should know how to control or monitor the pins of the controller. Monitoring and controlling are two different things in direction of the pins. Monitoring has to something with input whereas controlling has the output effect. Parallel port programming works with the direction of the pins (input or output), the values (to write or read) and the hybrid of all (input and output, monitor and control).
The serial port programming is the second powerful feature of the device. The port B pins has the dual functionality. It works in simple parallel port mode and special feature the serial port communication mode. The dedicated feature enables us to program the serial port in various forms. Same baud-rate for receive and send streams, variable baud, or what-ever the choice. To have a more ease, one can program the device to have baud rate depending upon the external device attached. The received data could be integer, characters, ASCII, or what-ever. The ALU helps in changing from one form to other. For e.g. 65 is ‘A' in ASCII but it could be a number 65 so as character ‘6' and character ‘5', this can be done before sending the integer via serial port. The integer value of character ‘6' is 36h and that of ‘5' is 35h. When sending integers over the serial line, one should know that the digits should be altered and converted to their ASCII value.
The I2C case is almost the same as of the serial port. The difference lies in the register access, and their names. The clocking sequence, data fetching technique and enables us to see how the ports are programmed (input or output).
The practice results in insight to the functionality and working of the controller. The exercises should me more in number and length so that the overall knowledge about the controller increases. As the experience increases, one will be able to make more optimised code and the peripherals are more likely to be handy with the knowledge.
As previously discussed about the exercise of the serial interfacing; the problem aroused with the ASCII code conversion of the integer values. The more big number, the more values should be taken to convert.
After the exercises are complete, I find myself to be able to program the parallel port flashing, serial port communication, the I2C protocol implementation for single-byte read/write and the burst based and the inside conversion of codes and the processing.