NumWorks UART Over USB port
Some people are complaining about the lack of connectivity to the outside world from the calculator, but in fact it is pretty simple to change that.
According to the calculator schematics, the USB port of the calculator is wired to PA11 and PA12 of the STM32F412. We have this in the datasheet about these pins :
So, it is possible to map an UART on the USB port D+ and D-.
The code is available here : https://github.com/zardam/epsilon/tree/uart_over_usb
I only have remapped the original firmware “Console” object to use USART6, and added a small Python module & exemple code to access it from the “Code” application.
There are some drawbacks :
- the RX pin (high when idle), backfeeds power to the battery charging circuit through the USB protection diodes (U3 on the schematics). This should not be a problem, as the charging chip has a brownout voltage of at least 3.4 V, well under the 2.8 V of the RX pin.
- The calculator battery icon stays in the charged state, certainly because of the above problem, but I did not really investigate this issue.
- The “Console” implementation is very limited (as it is only used for testing the calculator). There is no buffer, and reading is blocking. If nothing is sent, the calculator will stay waiting forever, without any chance to interrupt it (unless reseting).
With a bit more work, I think these issues can be overcome, giving the calculator an easy way to talk to the outside world !
A short demonstration, with a “null modem” adapter between the USB cables (it justs cross D+ and D- between the two cables):