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

STC15W408AS UART1 not working #113

Open
Adil-Sil opened this issue Jan 21, 2025 · 2 comments
Open

STC15W408AS UART1 not working #113

Adil-Sil opened this issue Jan 21, 2025 · 2 comments

Comments

@Adil-Sil
Copy link

Hello,
I am using STC15W408AS, code downloading from STC-ISP working fine everytime, but in my project's code UART1 never transmit or receive single byte, I tried several examples/chips but same failure occurs.
Is there is any solution. Code is [at:]
(https://electronics.stackexchange.com/questions/736307/stc15w408as-uart1-not-sending-receiving-data?noredirect=1#comment1958985_736307)
I think this is problem in chips.

@Olegansv
Copy link

Olegansv commented Jan 22, 2025

The reason is the same as here: #105 (comment).
Try to replace these lines

TL1 = (65536 - (FOSC/4/BAUD));
TH1 = (65536 - (FOSC/4/BAUD))>>8;
TR1 = 1;

to

T2L = (65536 - (FOSC/4/BAUD));
T2H = (65536 - (FOSC/4/BAUD))>>8;
AUXR |= 0x15; // T2R, T2x12 and S1ST2

@Adil-Sil
Copy link
Author

Thank you very much for your kind help, I didn't find anyone for help except you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants