Hi,
I have few problems while trying to communicate my pc with the PIC via RS232. I copied the test file from your website into my PIC16f877 and below are what i encountered:
1) The hyperterminal is not responding and display the message "hello" as mentioned in the RS232 data sheet. It also wouldnt echos back anything i typed from the keyboard. But when i tried using other terminal software, i did received respond from the LCD on whatever the characters i typed from the keyboard but not seeing the "Hello" message".
2) Also i would like to know the characters we are typing in are in what form(ascii,hex,etc)? as i would like to compare the value and gives output to the LED.
Regards
vincent chong
RS232 EB015
-
Sean
- Valued Contributor

- Posts: 548
- Joined: Tue Jun 26, 2007 11:23 am
- Has thanked: 6 times
- Been thanked: 44 times
Re: RS232 EB015
Hello Vincent,
The two main checks for these programs are the Baud rate and the hardware handshaking. Both of these settings can be found on the properties page of the Flowcode RS232 component. The Flowcode settings should be 9600 Baud, Hardware handshaking on (RTS = RC0, CTS = RC4).
Make sure the Hyperterminal settings match the Flowcode settings. Also, make sure the flowcode clock speed and target clock source selection fuses are set correctly.
Check the EB-015 jumper settings, port connection, and power supply voltage.
Make sure the correct type of RS232 cable is being used, and is connected to the correct connector on the EB-015 board.
If problems persist, try turning handshaking off.
The two main checks for these programs are the Baud rate and the hardware handshaking. Both of these settings can be found on the properties page of the Flowcode RS232 component. The Flowcode settings should be 9600 Baud, Hardware handshaking on (RTS = RC0, CTS = RC4).
Make sure the Hyperterminal settings match the Flowcode settings. Also, make sure the flowcode clock speed and target clock source selection fuses are set correctly.
Check the EB-015 jumper settings, port connection, and power supply voltage.
Make sure the correct type of RS232 cable is being used, and is connected to the correct connector on the EB-015 board.
If problems persist, try turning handshaking off.
-
vincentchong
- Posts: 19
- Joined: Mon Jan 11, 2010 11:33 am
Re: RS232 EB015
Hi Sean,
Thanks for the advise and i can see the program running now. well i know overall what the program does but i am having doubts in understanding how the macros work.
1) what is the parameter nChar(int) for the macro SendRS232Char means? I understand the macro is used to send characters to the terminal via RS232 and if " " are used then the characters inside it will appear in the terminal. What about when you put number? and why do you need to send 13 and 10 to the terminal with reference to the test file?
2) With reference to the test file, what is the purpose of the part where you compare the Char <> 255 , char = 13 and char = 10? Is it a default program setting for echo ?
Regards
Vincent
Thanks for the advise and i can see the program running now. well i know overall what the program does but i am having doubts in understanding how the macros work.
1) what is the parameter nChar(int) for the macro SendRS232Char means? I understand the macro is used to send characters to the terminal via RS232 and if " " are used then the characters inside it will appear in the terminal. What about when you put number? and why do you need to send 13 and 10 to the terminal with reference to the test file?
2) With reference to the test file, what is the purpose of the part where you compare the Char <> 255 , char = 13 and char = 10? Is it a default program setting for echo ?
Regards
Vincent
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: RS232 EB015
Hello Vincent
1) The parameter is the byte to be sent over the RS232. You are always sending ascii characters that is a number that has a symbol representation. A "0" is actually the ASCII representation of the number 48. A 10 represents a line feed and a 13 is a carriage return character.
2) Char <> 255 means if the char is not equal to 255. When you are reading the incoming RS232 you provide a timeout parameter. If the timeout is reached before a character is received then you get a return value of 255. So if the decision is not 255 then you know you have valid data. The echo is performed automatically as part of the component macro if you have this enabled.
1) The parameter is the byte to be sent over the RS232. You are always sending ascii characters that is a number that has a symbol representation. A "0" is actually the ASCII representation of the number 48. A 10 represents a line feed and a 13 is a carriage return character.
2) Char <> 255 means if the char is not equal to 255. When you are reading the incoming RS232 you provide a timeout parameter. If the timeout is reached before a character is received then you get a return value of 255. So if the decision is not 255 then you know you have valid data. The echo is performed automatically as part of the component macro if you have this enabled.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
vincentchong
- Posts: 19
- Joined: Mon Jan 11, 2010 11:33 am