Next part is to build working prototype. I choose Arduino Pro Mini for some reasons, its compact and cheap, more IO than normal UNO board. And it can be run with 3.3V and not need level shifter for SFP interface.
There are some limitations in Arduino Pro Mini. I realize that pin count is not enough for my requirements. I need 6 x GPIO pins for 6 push button switches. After using 10 pins for SFP and 5 Pins for LCD, 3 pins for LEDs, there is not much pins left for switches.
1) issues and workarround
Analog pin 6 and 7 are analog only input pins. Problem is these two pins not work reading as digital IO. After using mu GFu, someone shows the trick to use analog only pins as digital I/O. Here is code snip.
EN_sw = analogRead(A7) > 256 ? 0 : 1;
2) UART debug
For debugging and future extension such as PC or phone application interfacing, I added debug function in lib.
There are 6 Switches and main menu + sub-menu system in system.
- Splash Page
- About Page
- Main Menu
- TX/RX Sub-menu
- TX Sub-Menu
- RX Sub-Menu
- System Setup Sub-Menu
Key functions are as follows.
Splash Welcome page, CAN I HAZ POWER
And RX/TX power, TX enable, TX status and Alarm