5 Commits

Author SHA1 Message Date
9b64d7d3cd added unicode output in string generator script 2020-02-11 14:20:14 -05:00
8ca0846538 changeable USB PID support 2019-09-13 16:58:08 -04:00
afe184442d seriously wtf markdown 2019-08-24 16:26:16 -04:00
ad99d94a35 wtf markdown 2019-08-24 16:19:29 -04:00
e724165416 fix image formatting in readme 2019-08-24 16:14:37 -04:00
3 changed files with 20 additions and 8 deletions

View File

@@ -32,10 +32,13 @@ The bootloader is also capable of programming an entirely new application to the
1. Download the latest release of the firmware update utility from [https://source.jojcorp.com/bia-microddr/bia_microddr_fw_flash_utility/releases](https://source.jojcorp.com/bia-microddr/bia_microddr_fw_flash_utility/releases). 1. Download the latest release of the firmware update utility from [https://source.jojcorp.com/bia-microddr/bia_microddr_fw_flash_utility/releases](https://source.jojcorp.com/bia-microddr/bia_microddr_fw_flash_utility/releases).
2. Download the latest version of the application from [https://source.jojcorp.com/bia-microddr/bia_microddr_fw/releases](https://source.jojcorp.com/bia-microddr/bia_microddr_fw/releases). This will be a file with the extension ".hex". 2. Download the latest version of the application from [https://source.jojcorp.com/bia-microddr/bia_microddr_fw/releases](https://source.jojcorp.com/bia-microddr/bia_microddr_fw/releases). This will be a file with the extension ".hex".
3. Connect the device to be updated to the computer now if you have not already done so. **DO NOT CONNECT MORE THAN 1 BIA DEVICE WHILE UPDATING FIRMWARE!** 3. Connect the device to be updated to the computer now if you have not already done so. **DO NOT CONNECT MORE THAN 1 BIA DEVICE WHILE UPDATING FIRMWARE!**
![](https://source.jojcorp.com/bia-microddr/bia_microddr_fw_flash_utility/raw/branch/master/guideimgs/guide1.JPG)
![](https://source.jojcorp.com/bia-microddr/bia_microddr_fw_flash_utility/raw/branch/master/guideimgs/guide1.JPG)
4. Run the firmware update utility and it will notify you that it must put the device in firmware update mode. Click "OK" to continue. The device will very briefly disconnect from the PC and reconnect in firmware update mode. The utility should now display the device as "Connected". 4. Run the firmware update utility and it will notify you that it must put the device in firmware update mode. Click "OK" to continue. The device will very briefly disconnect from the PC and reconnect in firmware update mode. The utility should now display the device as "Connected".
5. Click the "Browse" button under "Step 2: Select App FW File" and open the ".hex" application firmware file you downloaded. 5. Click the "Browse" button under "Step 2: Select App FW File" and open the ".hex" application firmware file you downloaded.
![](https://source.jojcorp.com/bia-microddr/bia_microddr_fw_flash_utility/raw/branch/master/guideimgs/guide2.jpg)
![](https://source.jojcorp.com/bia-microddr/bia_microddr_fw_flash_utility/raw/branch/master/guideimgs/guide2.jpg)
6. Click the "FLASH FIRMWARE NOW" button. The utility will begin updating the application firmware on the device and will open a message dialog to notify you when the update is complete. This should not take more than a few seconds. 6. Click the "FLASH FIRMWARE NOW" button. The utility will begin updating the application firmware on the device and will open a message dialog to notify you when the update is complete. This should not take more than a few seconds.
![](https://source.jojcorp.com/bia-microddr/bia_microddr_fw_flash_utility/raw/branch/master/guideimgs/guide3.JPG)
![](https://source.jojcorp.com/bia-microddr/bia_microddr_fw_flash_utility/raw/branch/master/guideimgs/guide3.JPG)
7. Click "Yes" on the dialog to reset the device or disconnect and reconnect it to boot into the new application firmware. 7. Click "Yes" on the dialog to reset the device or disconnect and reconnect it to boot into the new application firmware.

View File

@@ -141,6 +141,9 @@ state according to the definition in the USB specification.
#include "usb.h" #include "usb.h"
#include "usb_device_hid.h" #include "usb_device_hid.h"
// 0xECEE = pad interface 1, 0xECE5 = pad interface 2
#define USB_DEVICE_PID 0xECEE
/** CONSTANTS ******************************************************/ /** CONSTANTS ******************************************************/
#if defined(COMPILER_MPLAB_C18) #if defined(COMPILER_MPLAB_C18)
#pragma romdata #pragma romdata
@@ -157,7 +160,7 @@ const USB_DEVICE_DESCRIPTOR device_dsc=
0x00, // Protocol code 0x00, // Protocol code
USB_EP0_BUFF_SIZE, // Max packet size for EP0, see usb_config.h USB_EP0_BUFF_SIZE, // Max packet size for EP0, see usb_config.h
0x04D8, // Vendor ID, see usb_config.h 0x04D8, // Vendor ID, see usb_config.h
0xECEE, // Product ID, see usb_config.h USB_DEVICE_PID, // Product ID, see usb_config.h
0x0001, // Device release number in BCD format 0x0001, // Device release number in BCD format
0x01, // Manufacturer string index 0x01, // Manufacturer string index
0x02, // Product string index 0x02, // Product string index

View File

@@ -6,11 +6,17 @@ if not len(sys.argv) > 1:
exit(0) exit(0)
instr = ' '.join(sys.argv[1:]) instr = ' '.join(sys.argv[1:])
count = 0 count = len(instr)
print('') print('')
print(f"num characters: {count}")
print('## ASCII ##')
print(f"size: {count} bytes")
for c in instr: for c in instr:
print(f"'{c}',", end='') print(f"'{c}',", end='')
count += 1
print('') print('')
print(f"size: {count}") print('')
print('') print('## Unicode ##')
print(f"size: {count*2} bytes")
for c in instr:
print(f"'{c}',\t0x00U,")
count += 1