USB device not recognized after changing Analog port #define

Status
Not open for further replies.

ZTiK.nl

Well-known member
I am experiencing something weird, and I am not sure what I should be looking at to solve this.

I am using all the analog pins except for A10 and A11.
I want to free the A4 and A5 pins, so I have been trying to rewire (any) two of the analog connections from the screen to A10 & A11.

Right at the start of my script I define pins including the following code:
Code:
#define XM A4
#define YP A5
#define LCD_CS A8
#define LCD_CD A9
#define LCD_WR A3
#define LCD_RD A1
#define LCD_RESET A2

Now when I switch any wire from the TFT (A1, A2, A3, A4 A5, A8 or A9) with A10 or A11 and upload my script, my Teensy doesnt run the code, and after hearing a 'usb-device connected sound' 2x, Windows reports 'USB device not recognized' (translated from Dutch)

Here I thought maybe I had broken my A10 port, so I tried on the A11, but the same thing happens there.
Then I connected a potmeter to A10 and A11 to see what the value is & test if the connections are allright and this works perfectly.

I tried to shorten the wire as small as possible to make sure that wasn't the problem.
Also important to note, when I switch A1 with A2, A3, A5 or A8 or any other combination between these, it always just works...

I do not receive any compile errors, nor can I find any mentioning of A10/A11 in any of the linked libraries or my own project files...
I have tried running Teensy both as Serial and as Keyboard/Mouse/Joystick device

Below is an image of my connections, I have focused primarily on switching A4/A5 with A10, so I marked these with arrows in paint for quick reference.
USB device not recognized.jpg

Since the problem starts with changing the define I don't know what other code is useful to post here.
My project has become quite big, but I'd be happy to post a new .zip file if that would help.

I think it is probably something stupid I'm overlooking, but I can't figure out where to start searching...
Is there anything 'special' about the A10/A11 pins I don't know about?
 
Last edited:
I think I know where this is going wrong.

Even though the pin definitions are analog for these 2 libraries (Touch & TFT), they use digitalWrite etc. on these pins.
A10 and A11 are unlike A0-A9 not combined/joined with a digital pin, so I think I cannot use these pins for the touch/tft connections.
 
Yes. the TFT will be using digital signals, even though the pins you used originally supported analog as well. A10-A13 on the teensy3 are analog only. Those pins don't support digital functions, and thus, won't work for driving anything requiring digital IO, like an LCD.
 
Status
Not open for further replies.
Back
Top