Bongofish
November 22, 2019, 01:52:52 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: You may have to login twice the first time,  but we don't know why - Erm I mean it's a security thing yeah that's it - security.
 
   Home   Help Search Login Register  
Pages: 1 2 [3] 4 5
  Print  
Author Topic: Interfacing a TabletPC digitizer  (Read 16350 times)
XDjackieXD
Sr. Member
****
Posts: 137


*me trying to draw*


View Profile WWW
« Reply #30 on: March 21, 2015, 10:30:31 PM »

Hmmmm...
That could be flow control... (DTR/RTS)
Have you tried other Baud rates yet?
Logged
Pesho
Hero Member
*****
Posts: 275



View Profile
« Reply #31 on: March 21, 2015, 11:24:51 PM »

I've tried 9600 and 19200 with no luck. i do inputattach, the LED on the FTDI board flashes 4 times and then nothing. I can't even get it to move for a little...

You know, it would be nice to see if there's any activity coming from the tablet at all... I might upload your waxwasp code to a nano just to see if the LED will flash from any digitizer activity.
« Last Edit: March 21, 2015, 11:27:31 PM by Pesho » Logged
XDjackieXD
Sr. Member
****
Posts: 137


*me trying to draw*


View Profile WWW
« Reply #32 on: March 22, 2015, 12:20:15 PM »

You could try 38400 baud (according to the linuxwacom thingy also valid).
For my code just connect rx and tx to the arduino and flash the code.
You need make, avr-gcc and avrdude.
just change the cpu-frequency in the makefile and in isdv4.c define F_16MHz instead of F_12MHz and then run make.
to flash it to the arduino nano run "avrdude -c arduino -b 57600 -P /dev/ttyUSB0 -p atmega328p -vv -U flash:w:main.hex" with the right port (doesn't have to be /dev/ttyUSB0).

Here is a precompiled version for 16MHz (just remove the .txt extension):
* main.hex.txt (3.01 KB - downloaded 190 times.)

* main.hex.txt (3.01 KB - downloaded 190 times.)
Logged
Pesho
Hero Member
*****
Posts: 275



View Profile
« Reply #33 on: March 22, 2015, 03:09:57 PM »

Ok, it turns out the RX cable was severed on the inside... Now i can get the cursor to move, but only for about 25 seconds until it stops. This could either be due to wonky cabling, or maybe it's the software configuration? Using DTR and RTS makes no difference, seems that only VCC, RX, TX and GND are necessary. The correct baud rate is 19200, its the only one that gets the cursor to move. 9600 shows activity on the TX/RX LEDs but nothing happens, and at 38400 moving the pen slightly makes the cursor to go crazy and start clicking things and closing windows at super speed.

I uploaded your hex file but i can't get the nano to show any ISDv4 activity, maybe the PB1 LED pin isn't the same as on the usnoobie. Compiling your code from github does the same thing. This is most likely a problem with my setup though.
Logged
XDjackieXD
Sr. Member
****
Posts: 137


*me trying to draw*


View Profile WWW
« Reply #34 on: March 22, 2015, 03:25:47 PM »

PB1 is arduino Digital Pin 9.
The LED turns on, when the pen touches the surface.
I hope that the FTDI on the nano doesn't interfere with the digitizer (they are on the same uart of the mega).
Logged
Pesho
Hero Member
*****
Posts: 275



View Profile
« Reply #35 on: March 22, 2015, 10:28:51 PM »

I hooked an LED to D9 and got it to light up from touching the surface, but it couldn't always turn off. It turns on and off sometimes, but not in any predictable way, most of the time when you move the pen around. Something odd i noticed about the nano is that the labels are RX0 and TX1 - are they on different channels or something like that? Or maybe the baud rate is different again?
« Last Edit: March 22, 2015, 10:36:25 PM by Pesho » Logged
XDjackieXD
Sr. Member
****
Posts: 137


*me trying to draw*


View Profile WWW
« Reply #36 on: March 23, 2015, 07:08:13 AM »

The 0 and 1 are only the labels for the digital channels.
The AtMega328p only has one UART on the outside (the "core" has 2).
The Baud rate should be correct at 16MHz clock...
Logged
Pesho
Hero Member
*****
Posts: 275



View Profile
« Reply #37 on: March 23, 2015, 03:41:57 PM »

I still think it might be an issue with my setup. Any clue as to why it would suddenly stop sending and receiving data after 30 seconds? Insufficient grounding perhaps?
Logged
XDjackieXD
Sr. Member
****
Posts: 137


*me trying to draw*


View Profile WWW
« Reply #38 on: March 23, 2015, 09:09:38 PM »

How long are your cables?
I used only 10cm long cables to the digitizer and your problem could be the tablet and atmega loosing sync (but when I understood the code correctly, it should detect the start of a new packet and resync....).
Is your 3,3V supply stable?

-Jakob
Logged
Pesho
Hero Member
*****
Posts: 275



View Profile
« Reply #39 on: March 23, 2015, 10:02:37 PM »

I'm using the 3V3 pin on the nano, it should be stable enough. The cables are about 10-15cm long but theres also an additional 10cm from the repurposed tabletpc cable. On the direct-FTDI setup i tried inputattach with --dump and the data just totally stopped at one point. Guess i could try making the wires between the digitizer connector and the ftdi board as short as possible.
Logged
XDjackieXD
Sr. Member
****
Posts: 137


*me trying to draw*


View Profile WWW
« Reply #40 on: March 24, 2015, 10:45:41 AM »

Everything below about 30cm should be fine...
It's interesting, that the data suddenly stops.
I never had this problem...
Logged
Pesho
Hero Member
*****
Posts: 275



View Profile
« Reply #41 on: April 25, 2016, 09:42:43 PM »

OK, i've since given up on investigating why it stops responsding with the FTDI chip and ordered a Teensy. However, there is surprisingly little info on how to use Waxbee with a TabletPC digitizer, most of it is for  regular ADB tablets. I've soldered leads to VCC, GND, D2 and D3 on the teensy and uploaded Waxbee with the Intuos2 template but... nothing. No device is recognized when i plug it in via USB nor does hid_listen give out anything. I'm trying to do this on Linux, but even on XP there's nothing. The only time anything shows up in the device manager is when i press the button to switch to "HalfKay" mode. What am i doing wrong here? Shouldnt the Teensy show up even without being connected to the digitizer?
Logged
Pesho
Hero Member
*****
Posts: 275



View Profile
« Reply #42 on: May 05, 2016, 12:15:47 AM »

Anybody? The .hex file uploads fine but no device appears anywhere...
Logged
Aerendraca
Administrator
Hero Member
*****
Posts: 1069


View Profile
« Reply #43 on: May 05, 2016, 06:55:15 AM »

Did you get your teensy from a reputable source? I read about there being dud Chinese clones that are only good for flashing leds.

Have you checked that the teensy runs other code ok? Maybe see if you can program it with a standard hid template like a mouse or keyboard, at least that was you can confirm the teensy is working correctly. Once you know that you can be sure that something is up with the waxbee programming.

Have you tried a different usb cable? Some only have 2 wires for charging devices only.
Logged
Pesho
Hero Member
*****
Posts: 275



View Profile
« Reply #44 on: May 05, 2016, 10:14:20 AM »

It wasn't straight from the PJRC store, so i guess that would make it a chinese dud? I did however try a "Hello world keyboard HID" example (a keyboard that sends Hello world keystrokes) and it works exactly as it should. Everything Teensy-specific like the loader, Teensyduino integration, even Waxbee's Java app works. Only when i flash the waxbee hex that it goes silent. Perhaps there is something very Teensy-specific like pin numbers in the waxbee code that's making it not work with a clone? I tried compiling but the code is old and avr-gcc is giving out errors left and right. Also from what i've read most people use the Arduino IDE nowadays...

Guess the best thing to do is grab one from the PJRC store and compare the two. If waxbee works with Arduino Pro Micros, it should work with this, but who knows.
« Last Edit: May 05, 2016, 10:17:21 AM by Pesho » Logged
Pages: 1 2 [3] 4 5
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!