Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sun_usb: doesn't work with SERIAL_SOFT_LOGIC_NEGATIVE commented out #228

Closed
tmk opened this issue Jun 1, 2015 · 0 comments
Closed

sun_usb: doesn't work with SERIAL_SOFT_LOGIC_NEGATIVE commented out #228

tmk opened this issue Jun 1, 2015 · 0 comments
Labels

Comments

@tmk
Copy link
Owner

tmk commented Jun 1, 2015

When SERIAL_SOFT_LOGIC_NEGATIVE is commented out RXD interrupt should be triggered on falling edge instead of rising.

Interruption setting code in config.h

/* RXD Interupt */
#define SERIAL_SOFT_RXD_INIT()      do { \
    /* pin configuration: input with pull-up */ \
    SERIAL_SOFT_RXD_DDR &= ~(1<<SERIAL_SOFT_RXD_BIT); \
    SERIAL_SOFT_RXD_PORT |= (1<<SERIAL_SOFT_RXD_BIT); \
    /* enable interrupt: INT2(rising edge) */ \
    EICRA |= ((1<<ISC21)|(1<<ISC20)); \
    EIMSK |= (1<<INT2); \
    sei(); \
} while (0)

should be:

    EICRA |= ((1<<ISC21)|(0<<ISC20)); \

http://deskthority.net/workshop-f7/sun-usb-conversion-with-arduino-micro-and-tmk-t10779.html#p233452

@tmk tmk added the TODO label Jun 1, 2015
@tmk tmk closed this as completed Jun 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant