RS232 Test

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
Chad528
Posts: 9
Joined: Wed Sep 19, 2007 4:43 pm
Contact:

RS232 Test

Post by Chad528 »

I programmed the 16F877A with the RS232.hex file. I setup Hyperterminal as per the instructions for the board. I cannot see any communication. The call button is greyed out on Hyperterminal, which indicates some kind of connection, I think.

My RS232 cable is a one to one pinout. Could this be the problem? Do I need a null modem cable that crosses pins 3 and 2?

Thanks,
Chad

User avatar
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:

Post by Benj »

Hello Chad

Your cable should be correct. Have you checked that the baud rate, hardware flow control, etc settings match on the Pic and the PC.

Chad528
Posts: 9
Joined: Wed Sep 19, 2007 4:43 pm
Contact:

RS232 Test

Post by Chad528 »

No, I have not set the chip baud rate. How do I do this, I cannot find it in the manual?

Thanks for your reply.

Chad

User avatar
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:

Post by Benj »

Hello

If you are using Flowcode then you need to go into the component properties.

If you are programming your own routines then you will need to manually set up the baud rate etc in your code.

Chad528
Posts: 9
Joined: Wed Sep 19, 2007 4:43 pm
Contact:

RS232 Test

Post by Chad528 »

I did not know that I had to setup the chip in Flowcode if I was just loading the RS232.Hex file. Do I create a new flowcode program with nothing in it and configure the chip, then go to PPP to load the Hex file?

I do not understand the process for just testing that the RS232 board communicates correctly. I wanted to get this functionality working first so that I can isolate any issues I have with my 16F88 flowcode program to something I have done.

I do already have a 16F88 program that worked perfectly on the simulator. As another solution, should I configure the chip properties and then communicate to Hyperterminal as a test?

Chad

User avatar
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:

Post by Benj »

Hello Chad

You set the RS232 properties in the RS232 component. If you open up Flowcode and create a new file. Select your processor and then add the RS232 component.

Next create a loop with a RS232 SendByte hardware macro with "Hello From E-Blocks" as a parameter and a delay of 5 seconds.

Next click on the small arrow on the RS232 component and goto properties. Make sure that the properties here match those in Hyperterminal.

Next click on chip and configure. Make sure that you are using XTAL mode and watchdog is off.

You should now be ready to compile your program and send the data to the chip.

The program will then print out

Hello From E-Blocks, every 5 seconds.

Chad528
Posts: 9
Joined: Wed Sep 19, 2007 4:43 pm
Contact:

Problem Solved

Post by Chad528 »

Thank you so much. Now I am understanding how to work things and I can configure my program setup. :D

Post Reply