Disk Cell Phone on LPC810
Of course, this is an “ax mess”, because in addition to the LPC810 with its six GPIOs, you also need a GSM module. The firmware is based on examples from here , the firmware itself lies here .
To connect four contact groups (three buttons and a dialer), as well as a display on the HD44780 operating in four-bit mode, the following circuit is applied to the three outputs of the microcontroller:
Shift register - type 74HC164. To poll one of the contact groups, it is necessary to write the number 0x01, 0x02, 0x04 or 0x08 into it. The display module “does not pay attention” to what is happening, since the line EN is zero, and the signal about the state of the selected contact group is sent to the DAT line.
The resistors are selected so that the signal from the microcontroller takes precedence over the signal from the contact group, namely, R2 - several kOhm, R3 (pulling down) - 22 kOhm.
The STATUS signal from the GSM module controls the voltage regulator. If you turn on the module, voltage will appear on this line and the entire device will turn on. When manually or automatically disconnecting the GSM module, the entire device is also turned off. Complete outline:
The same outline in PDF
The firmware consists of two state machines. The first processes interrupts from the UART receiving line, writes the characters coming from there to the buffer, and when AT-sequences are detected, sets the corresponding flags. Another finite state machine is the main event loop that reads these flags and changes its behavior depending on their state. The cycle takes about 16 ms, and this is enough to read all digital inputs, including the input from the dialer.
The case is chosen large enough to fit the dialer, a 1000 mAh battery, and everything else. There is enough space left in the ROM so that in the future it will be possible to implement control of the DTR line, the transition to power-saving mode and AON.
A lot of pictures , files in Eagle 6 format , firmware sources