Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:usbioboard [2015/05/20 23:13] odroid [Cross Compiler] |
en:usbioboard [2017/05/20 10:37] (current) odroid [Introduction] |
||
---|---|---|---|
Line 9: | Line 9: | ||
It has a bootloader that allows for downloading or upgrading the firmware. | It has a bootloader that allows for downloading or upgrading the firmware. | ||
- | You can find the data sheet for the PIC18F45K50 microcontroller [[http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en558861 | here]]: | + | You can find the datasheet for the PIC18F45K50 microcontroller [[http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en558861 | here]]: |
---- | ---- | ||
===== Hardware ===== | ===== Hardware ===== | ||
Line 30: | Line 30: | ||
===== Software ====== | ===== Software ====== | ||
+ | You have to install the cross compiler before IDE installation | ||
==== Cross Compiler ==== | ==== Cross Compiler ==== | ||
- | MPLAB C18 v3.43 or higher \\ | + | MPLAB C18 v3.43 or higher From Microchip homepage\\ |
- | (From Microchip homepage : http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010014&redirects=c18)\\ | + | http://www.microchip.com/Developmenttools/ProductDetails.aspx?PartNO=SW006011 \\ |
We've also tested C18 v3.47 Standard-Eval Version. It works well.\\ | We've also tested C18 v3.47 Standard-Eval Version. It works well.\\ | ||
Line 46: | Line 46: | ||
http://www.microchip.com/mplabx-ide-windows-installer | http://www.microchip.com/mplabx-ide-windows-installer | ||
+ | ==== Writing bootloader with PICKit 3 ==== | ||
+ | [[en:picwriting|Writing bootloader with PICkit 3]] | ||
==== Header & breadboard connection ==== | ==== Header & breadboard connection ==== | ||
To attach it to a breadboard, you must solder two 14-pin headers onto the IO board.\\ | To attach it to a breadboard, you must solder two 14-pin headers onto the IO board.\\ | ||
Line 58: | Line 60: | ||
==== Firmware source code & Hex file downloader for Windows OS ==== | ==== Firmware source code & Hex file downloader for Windows OS ==== | ||
- | {{:en:Microchip_Solutions_v2012-10-15.zip}} | + | |
+ | [https://github.com/hardkernel/Odroid-USBIO ] | ||
+ | |||
+ | Prebuilt Hex file | ||
+ | {{ :en:fw.zip}} | ||
To enter into firmware update mode, press the switch on the board and plug the USB cable. | To enter into firmware update mode, press the switch on the board and plug the USB cable. | ||
Line 64: | Line 70: | ||
The update utility is "HIDBootloader (Windows).exe" which can be found in "/USB/Device - Bootloaders/HID/". | The update utility is "HIDBootloader (Windows).exe" which can be found in "/USB/Device - Bootloaders/HID/". | ||
+ | The EXE file should be found in this file. | ||
+ | {{:en:microchip_solutions_v2012-10-15.zip}} | ||
==== Hex file downloader for Linux OS ==== | ==== Hex file downloader for Linux OS ==== | ||
<del>Do not use mphidflash ! It will break the bootloader !</del> | <del>Do not use mphidflash ! It will break the bootloader !</del> | ||
Line 73: | Line 81: | ||
**Update!** :-) | **Update!** :-) | ||
- | The latest mphidflash version 1.6 works well with Linux host PC. | + | The latest mphidflash version 1.6 works well on a Linux host PC. |
http://code.google.com/p/mphidflash/ | http://code.google.com/p/mphidflash/ | ||
Line 87: | Line 95: | ||
Resetting device... | Resetting device... | ||
</code> | </code> | ||
- | ==== Example firmware source code for PIC18F45K50 ==== | ||
- | For the latest firmware and host python code, please visit | ||
- | [https://github.com/hardkernel/Odroid-USBIO ] | ||
- | |||
- | Prebuilt Hex file | ||
- | {{ :en:fw.zip}} | ||
- | |||
==== Example host software source code for Android ==== | ==== Example host software source code for Android ==== | ||
Line 107: | Line 108: | ||
- | To test this app you need to connect a potentiometer (variable resistor) to the RA0 pin as in this picture. | + | To test this app you need to connect a potentiometer (variable resistor) to the RA1 pin as in this picture. |
{{:en:s_20121226_191545.jpg?560}} | {{:en:s_20121226_191545.jpg?560}} | ||
Line 122: | Line 123: | ||
==== Example host software source code for Ubuntu ==== | ==== Example host software source code for Ubuntu ==== | ||
- | {{ :en:usbio.tgz }} | + | Install libusb. |
+ | sudo apt-get install libusb-1.0-0-dev | ||
- | The usbio.tgz host software for Ubuntu needs libusb-1.0-0-dev to build. | + | Install python usb library. |
<code> | <code> | ||
- | $ sudo dpkg -l | grep -i libusb | + | git clone https://github.com/walac/pyusb |
+ | cd pyusb | ||
+ | sudo python ./setup.py install | ||
</code> | </code> | ||
- | The following command shows you which version installed under your Ubuntu system. | + | Downloads C and python examples. |
+ | git clone https://github.com/hardkernel/Odroid-USBIO | ||
+ | |||
+ | This host software is just a simple command line, not X window system like QT and KDE. | ||
+ | Connect the IO_board using a micro usb cable to your ubuntu system. Execute the command | ||
- | If you don't see any version of libusb you have to install the following command can be typed in the termainal: | + | cd Odroid-USBIO/usbio/linux |
- | <code> | + | Make & Run C source. |
- | $ sudo apt-get install libusb-1.0-0-dev | + | make |
- | </code> | + | sudo usbio |
- | Download and unzip like this command. | + | |
- | <code> | + | |
- | $ tar xzf usbio.tgz | + | |
- | </code> | + | |
- | Go to the usbio folder you unzipped, and then type make command to build. | + | |
- | This host software is just a simple command line, not X window system like QT and KDE. | + | Run python file. |
- | + | sudo python usb_io_demo.py | |
- | Connect the IO_board using a micro usb cable to your ubuntu system. Execute the command | + | |
- | <code> | + | |
- | $ sudo ./usbio | + | |
- | </code> | + | |
For the latest firmware and host python code, please visit | For the latest firmware and host python code, please visit | ||
[https://github.com/hardkernel/Odroid-USBIO ] | [https://github.com/hardkernel/Odroid-USBIO ] | ||
- | |||
==== Logical data transfer between IO-board and ODROID ==== | ==== Logical data transfer between IO-board and ODROID ==== | ||
Logical data transfer between IO-board and ODROID is utilized driver-less USB HID protocol. | Logical data transfer between IO-board and ODROID is utilized driver-less USB HID protocol. |