how to properly set the transmission parameters RS

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
siwo278
Posts: 39
Joined: Tue Feb 12, 2013 9:07 am
Has thanked: 4 times
Been thanked: 5 times
Contact:

how to properly set the transmission parameters RS

Post by siwo278 »

Hello
How should I set the correct transmission parameters for the serial port?
Exactly interested in serial transmission on the bus 485. In my program I want to send 14 characters at 1200 bps. UP is used PIC18F46K22 with quartz 3,2768MHz, the program is set to interrupt TMR0 - 100Hz I know (diagram explains the connections) that I have to wait ok.20ms at the end of sending data to odbirnika and exact change in broadcasting - receiving for the MAX485. So it follows that my UP can query about every 25ms. And here I was killed. I query my UP every 250ms, and get an answer. The problem is that after a time disappears transmission that is the question page views a questioner UP stops to respond.

jak prawidłowo ustalić paramatry transmisji RS
Witam

Jak powinno się ustawić prawidłowo parametry transmisji dla portu szeregowego?
Dokładnie interesuje mnie transmisja szeregowa na magistrali 485. W moim programie chcę wysyłać 14 znaków z prędkością 1200 bps. Używanym UP jest PIC18F46K22 z kwarcem 3,2768MHz, w programie jest ustawione przerwanie TMR0 - 100Hz Już wiem (schemat wyjaśnia sposób połaczenia) że muszę odczekać ok.20ms na zakończenie wysyłania danych do odbirnika, a dokładnie ze zmianą stanu nadawanie - odbieranie dla MAX485. Czyli wynika z tego że moj UP mogę odpytywać co około 25ms. I tu poległam. Odpytuję mój UP co 250ms, i dostaję odpowiedź. Problem w tym że po czasie zanika transmisja to znaczy zapytania z strony pytającego wychodzą a UP przestaje na nie odpowiadać.
Attachments
glowny_up_18f46k22v14.fcf
(575.76 KiB) Downloaded 353 times
Schowek01.jpg
Schowek01.jpg (51.15 KiB) Viewed 7806 times
Protel Schematic.pdf
(49.13 KiB) Downloaded 343 times

siwo278
Posts: 39
Joined: Tue Feb 12, 2013 9:07 am
Has thanked: 4 times
Been thanked: 5 times
Contact:

Re: how to properly set the transmission parameters RS

Post by siwo278 »

Hello

I gave partly cope with this problem. (drawing)
In spite of this, please, and I'll be grateful for a broader representation of the method of calculation and correct setting of the RS232 port.

Witam

Częściowo dałam sobie rady z tym problemem. (rysunek)
Pomimo tego proszę i będę wdzięczna, za szersze przedstawienie sposobu obliczeń i poprawności ustawienia portu RS232.
Attachments
Schowek02.jpg
(146.97 KiB) Downloaded 1584 times

Post Reply