Popis: |
In this paper, the communication between Arduino Mega microcontroller and mini thermal printer is implemented by hardware and software integration. The microcontroller is programmed to transfer the data from microcontroller to printer using a serial communication protocol such as universal asynchronous receiver and transmitter (UART) via Serial communication devices such as MAX232 converter, DB9 connector which is nothing but RS232 serial port, and universal serial bus (USB) communication port. Data sent by the microcontroller is made to print from the printer and it is shown in the result section. Digital pins '3' and '4' on the microcontroller are used as virtual Rx and Tx serial lines while leaving the main serial port open for debugging purposes. Interfacing between UART of microcontroller, MAX232, serial port, and the USB port of printer are well established with the complete schematic diagram. The mini thermal printer prints whatever is sent by the microcontroller. A simple code similar to the one used for the serial monitor works for the printer. The baud rate needs to be set at 9600 for the microcontroller to communicate with the printer. The system is designed to print data wirelessly using Bluetooth HC-05 for restaurant and hospital management applications. The system has high adaptability. It can be used in many situations not only for restaurant and hospital management. |