Upgrading Firmware
Firmware Version 5.4 released 13th September 2018.
http://www.pthat.com/PTHAT-Firmware-5-4.zip
Fixed E-Axis Auto Change Direction. Thanks to Bill for reporting this bug.
Firmware Version 5.3 released 20th July 2018.
http://www.pthat.com/PTHAT-Firmware-5-3.zip
Many new features in this release and some changes.
PWM Channels:
New in this release we have enabled two dedicated channels for Pulse Width Modulation output.
At the moment the Pulse Train hat already has 4 dedicated Pulse Train Channels that can be set and variable, but requests have been coming in for people also wanting to drive add-on boards that require variable pulse widths.
We have set up a dedicated page showing some examples which can be found on the Pulse Width Modulation page.
New Commands:
Also there are some new commands added to the list that can be used.
As well as the Buffer Start Command, we have added the Buffer Loop Start Command.
With this new command, you can tell the PTHAT to keep cycling through the commands loaded in the buffer and when it gets to the last command, it will go back to the top and start repeating the commands.
We used this method on our Laser Light Show demonstration over on hackster.io
Also buffer size is increased from 100 commands to 2000 commands.
The Wait Delay Command that people tend to use when buffering commands can now set a delay in Milliseconds as well as Microseconds. So before you set it with I00WW1000* for milliseconds and now you can use I00WM1000* for microseconds.
The PWM Channels have also been added, so you can set the Frequency of the individual channels between 1Hz and 1MHz and also set the 12bit duty cycle.
Please check the Command Set page see all new commands.
Request Status of IO pins.
This has been added for people wanting to use the ES and Limit switch inputs as normal inputs.
ES and Limit Switch triggered messages.
We have reduced the amount of characters to bring these messages in line with the other replies to be divisible by 7.
ESTrig*
XLTrig*
YLTrig*
ZLTrig*
ELTrig*
Speed increase to 500kHz.
We have always stated that the Pulse Train outputs were good for a frequency of upto 100kHz, but while we were originally prototyping we found we were getting much higher speeds. But with all the rushing and work involved to get the PTHAT to market, we decided to stick with the statement of the top stable speed being 100kHz.
After months of testing and swapping out parts, we discovered that the factory doing the PCB assembly had placed a incorrect capacitor on each DDS output and this was the reason for the speed restriction.
Now for the fact that most people running Stepper motors would probably not go faster that 80kHz did make this a minor issue, but for people wanting to modify their PTHAT and swap out the capacitor, we have set up a Modifications page, which shows you what to do.
This only applies to PTHAT’s purchased in 2017, all the ones purchased after April in 2018 have the correct capacitors and we have now updated the website with scope shots and information about this.
Firmware Version 5.1 released 6th October 2017.
http://www.pthat.com/PTHAT-Firmware-5-1.zip
Version 5.1 has various bug fixes which include format of replies and extra routines that we will soon document on the command page.
We will be supplying a simple JTAG programmer that will allow everyone who purchased a PTHAT to upgrade new any new version of the firmware that gets released.
It will also allow other developers who would like more control over the hardware to program their own code for the ARM STM32F411 processor that is used on the PTHAT.
We cover development further on down this page.
Please note although the PTHAT is crammed with commands and features, it is still and will always be under development as we get feed back and fix any bugs or add features requests as required. For this reason we have provided an easy way to upgrade new releases of the firmware by supplying each mainboard with a Jtag programmer.
Programming the PTHAT with the latest firmware is very simple.
1.) The PTHAT can be upgraded without it connected to the Raspberry Pi. Connect the ribbon cable as shown in the picture.
2.) Download and install the STM32 Link Utility software using this link.
http://www.st.com/content/st_com/en/products/embedded-software/development-tool-software/stsw-link004.html


Make sure you connect the ribbon cable as shown in the pictures, if you get it the wrong way around, then you may damage your board.

2.) Browse to the latest PTHAT firmware file, select it and click the Open button.

2.) Click on the Start button to start it programming.

Next just disconnect the ribbon cable and you are ready to use the PTHAT again.

Closer look at the PCB's
PTHAT Mainboard
- Single Channel Main Board.
- JTAG Programmer.
- Set of Mounting Spacers and Bolts.
PTHAT Add on Board
- Expansion Add on Board.
- Increases the PTHAT to 4 channels.
- Extra I/O Functionality.
- Set of Mounting Spacers.
PTHAT Full Package
- Single Channel Main Board.
- Expansion Add on Board.
- Increases the PTHAT to 4 channels.
- Extra I/O Functionality.
- JTAG Programmer.
- Set of Mounting Spacers and Bolts.
- Save £10 with this Package