Discussion in "AVR Discussion Forum" started by    Nestor_avr    Aug 7, 2013.
Wed Aug 07 2013, 06:07 pm
#1
Good morning everyone, I'm riding a USB joystick and am not able to exchange for the D + D-is that the code always gives error.








[ Edited Wed Aug 07 2013, 08:37 pm ]
Wed Aug 07 2013, 08:49 pm
#2
Hello Nestor_avr, welcome to our site

I am not able to understand your problem because of the translation
Can you tell us more about what is wrong ?
Wed Aug 07 2013, 11:12 pm
#3
Explaining better.
To facilitate assembly of the circuit need to change the position in the code pins d- per d+

D - = 14 Pin need to change to pin 15
D + = 15 Pin need to change to pin 14

The circuit is easy to change over I'm not getting the code change


[ Edited Thu Aug 08 2013, 01:43 am ]
Thu Aug 08 2013, 10:13 am
#4
As per AVRusb lib, its recommended to use D+ pin where you have interrupt capability. So make sure you abide that rule. as per your question, you can exchange those pins in "Arcade_Joystick.asm" file

.equ	inputport		=PINB
.equ	outputport		=PORTB
.equ	USBdirection	=DDRB
;.equ	DATAplus		=1				;signal D+ on PB1
.equ	DATAplus		=0				;signal D+ on PB0
;.equ	DATAminus		=0				;signal D- on PB0 - give on this pin pull-up 1.5kOhm
.equ	DATAminus		=1				;signal D- on PB1 - give on this pin pull-up 1.5kOhm


You also need to change D- pullup from PB0 to PB1 now ok?
Thu Aug 08 2013, 06:07 pm
#5
Thus I had tried harder not work, the circuit is changed like this:



[ Edited Thu Aug 08 2013, 10:00 pm ]
Sat Aug 10 2013, 06:38 pm
#6
Does anyone have any more suggestions, still can not solve the problem.


[ Edited Sat Aug 10 2013, 06:39 pm ]
Mon Aug 12 2013, 10:02 am
#7
ok... are you using v-usb as a firmware? then probably IO configurations are in usbconfig.h instead of the files you've shared.
Mon Aug 12 2013, 10:27 pm
#8
It did not work and I use the same original layout
to make other changes have to know the pin code 4, can anyone help?

pin 4 = INT0 Code: ?
pin 5 = INT1 Code: 0b00010011
Tue Aug 13 2013, 02:01 pm
#9
you might need to share some more information coz I am not able to understand what exactly you're asking.
Tue Aug 13 2013, 04:14 pm
#10
I managed to find the code, thanks to everyone who helped.

pin 4 = INT0 Code: 0b00000111

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

scaneraNom
Sat May 04 2024, 02:21 am
gtaletrzua
Fri May 03 2024, 10:55 am
Clydehet
Wed May 01 2024, 06:44 pm
Davidoried
Wed May 01 2024, 06:11 pm
KevinTab
Sun Apr 28 2024, 05:35 am
Tumergix
Sun Apr 28 2024, 12:59 am
StevenDrulk
Sat Apr 27 2024, 08:47 pm
StephenHauct
Sat Apr 27 2024, 09:38 am