Part 1, why I do that. How to use Wacom tablet with serial interface?
- Use USB->serial converter and install serial driver (easy on win XP, pain in the ass on Win7).
- Buy Tablet-PC Win7 magically can use build-in drivers for on-board serial port.
- Ask Wacom for dedicated converter, maybe they build one?
- Use touch digitizer, that typically have serial input and USB output.
- Program Teensy 2.0 with WaxBee software.
Last option looks best for me and it's the most popular option on that forum. So let's utilize community help and start soldering.
Oh no! I don't have Teensy 2.0. I need to buy one or find some substitute
. What is and what contains Teensy 2.0?
What contains Arduino Leonrdo, Arduino Micro, SparkFun's Pro Micro? Exactly the same, but:
- ATmega32U4 micro controller (uC),
- USB connector,
- Crystal oscillator,
- Reset switch,
- Lot of free I/O pins,
- Some passive components (resistors, capacitors).
- HalfKay bootloader
- extra voltage regulator,
- extra LEDs,
- some times lack of reset button,
- different bootloader.
Every of that alternatives is more expensive, minimum 15$ each. Every except one, the chinese clone of Pro Micro. Note the difference.
- Original SparkFun's board is red, while clone board is blue.
- Original Arduino have at least 2x17 pins, while clone board almost always 2x12 pins
- Clones are a lot cheaper, 5$ or less, including free shipping from china.
Then just go to aliexpress.com
and search for Arduino Pro Micro. I bought three clones for 3$ each.
But there's a trap. ATmega32U4 have only 32kB of flash.
Teensy have build-in "HalfKay" bootloader, that occupied 0.5kB. So WaxBee can utilize up to 31.5kB. The bootloader code is property of PJRC and so far nobody copy it. That's why we can't buy Teensy clones.
Arduino and other clones have different bootloader, that occupied 2 or 4kB. So WaxBee can utilize up to 28 or 30kB.
Latest build of WaxBee need more than 30kb, hence the problem.
(EDIT [bernard]: Note to the reader: a more recent version of WaxBee now adjusts the size of the build to help with this problem)
How to deal with that?
I wish to get source code of WaxBee
, remove spare parts (everyone need one ADB or ISDV4 or Protocol 4 or Protocol 5, not all protocols in one adapter), compile it and get smaller size of the output file. That can be simply uploaded into Pro Micro clone.
But at these moment, that solution is too complex for me.
So there's another solution. Just say f** word to the bootloader, get any AVR ISP programmer and upload code without using bootloader.
Part 2, how to flash Pro Micro (clone) and any other compatible board with WaxBee firmware. 1. Configure WaxBee software to Your requirements.
- Load config from template.
- Change clock frequency to frequency that use Your board.
I have both 16Mhz and 8Mhz board. Only 16Mhz works with WaxBee hex, don't know why. 2. Generate hex file.
1.png3. Get programmer.
(17.28 KB. 501x315 - viewed 131 times.)
I grab UsbASP, DIY programmer that I build years ago.
IMG_3737 - Kopia.JPG
(377.46 KB. 1365x1139 - viewed 127 times.)
IMG_3736 - Kopia.JPG
(477.35 KB. 1609x859 - viewed 124 times.)
You can buy second Pro Micro board and use it as a programmer, like shows video: https://www.youtube.com/watch?v=c4k59CFpYCA
Of course You can use any different AVR programmer too. There are many of them. 4. Connect programmer to Your board. Also, connect USB to board.
(122.39 KB. 774x546 - viewed 134 times.)
IMG_3738 - Kopia.JPG5. Program Atmega32U4.
(427.91 KB. 1198x1319 - viewed 130 times.)
You need what programmer You use and have software that support programmer.
I use UsbASP that's supported by AvrDude.
For use it, You can execute command-line/terminal with special parameters, or write command-line script that make it little easy.
Yes, there are some GUI programs for that, but i like that method.
I create script named program.bat
avrdude -c usbasp -p atmega32u4 -U flash:w:%~nx1
It will run only on windows, tested on XP and win7.
- run program avrdude.exe with parameters-c usbasp
- select programmer UsbASP-p atmega32u4
program device named atmega32u4 (there's different algorithms for different uC)-U flash:w:
filename - write filename into flash memory%~nx1
- now I can drag'n'drop hex file into bath script and that variable contain name of file that i dropped. pause
- do not close window after finish.
For programming that way You need to have hex file, avrdude.exe and avrdude.conf in same directory that bath script
(39.07 KB. 875x656 - viewed 133 times.)
and cross Your fingers.
(11.77 KB. 677x342 - viewed 127 times.)
Sometimes it's fail,
(22.33 KB. 677x534 - viewed 130 times.)
but second try always pass. 6. Check that uC works.
- You not need Wacom software and digitizer for that.
Simply try to unplug then plug again, search for WaxBee converter into device manager.
WaxBee is a HID device, so Win not need any driver for mark it as working unit.
If windows show You that there's a problem or unrecognized USB device, the uC doesn't working ok. That mesage should appear always when chose wrong clock speed. For me, it's appear for 8Mhz board, no matter what clock I select
16Mhz/5V board works well.
Extra part, just to be fair.
That's not review of my build, I'll post full relation later.
Software: Win7 64b, WacomTablet_6.1.7-3.exe from wacom.asia
Hardware: SU5E-13W01AS-01X digitizer (serial, ISDV4, silver back) integrated into HV133WX1-100 LCD and Pro Micro clone.
Firmware: Intous2, not trimmed to digitizer size yet.