RS232 board

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

Moderators: Benj, Mods

Post Reply
Robin
Posts: 5
Joined: Sun Jun 21, 2009 10:15 pm

RS232 board

Post by Robin »

Hi
Last edited by Robin on Sun Dec 12, 2010 9:36 pm, edited 1 time in total.

User avatar
Steve
Matrix Staff
Posts: 3434
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: RS232 board

Post by Steve »

How about using a bluetooth E-Block and a bluetooth dongle at the PC side?

Robin
Posts: 5
Joined: Sun Jun 21, 2009 10:15 pm

Re: RS232 board

Post by Robin »

The range of bleutooth is very limited.
Last edited by Robin on Sun Dec 12, 2010 9:37 pm, edited 1 time in total.

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:

Re: RS232 board

Post by Benj »

Hello

You will not require the RS232 board as the EZL module takes TTL level serial communications. You may need to make a custom cable to go between the ECIO and the EZL module.

An application board for the ECIO may make things easier if you are using E-Blocks.

Robin
Posts: 5
Joined: Sun Jun 21, 2009 10:15 pm

Re: RS232 board

Post by Robin »

Thanks for your response,
So you mean I can connect the EZL with an application board with the ecio.
And still be able to program it with the rs232 component of flowcode?

That would save me 40 € :)

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:

Re: RS232 board

Post by Benj »

Hello

Yes you will be able to use the Flowcode RS232 component to talk directly to the EZL module using pins RC6 and RC7 of the ECIO. You should also be able to add flow control in the Flowcode RS232 properties if it is needed by the module this would require anouther 2 free I/O pins.

Looks like a good project. Let us know how you get on.

Robin
Posts: 5
Joined: Sun Jun 21, 2009 10:15 pm

Re: RS232 board

Post by Robin »

Hi,
That answers all my questions, thanks again.
Last edited by Robin on Sun Dec 12, 2010 9:38 pm, edited 1 time in total.

Robin
Posts: 5
Joined: Sun Jun 21, 2009 10:15 pm

Re: RS232 board

Post by Robin »

Busy
Last edited by Robin on Sun Dec 12, 2010 9:38 pm, edited 1 time in total.

y0sh1matzu
Posts: 2
Joined: Fri Jan 29, 2010 9:11 pm

Re: RS232 board

Post by y0sh1matzu »

Hello,

I am new here, and hopefully some one can help me ^.^

Anyways, I am using 16f877a pics with flowcode 3.6.11.53 to program. All i wanted to do is to send a charter[byte] and receive it at the other end. But it seems I can't even get that right. My sending program needs a user to push a button, port a bit 0, to send a charter, and it will show that on the lcd screen connected to port b. it sits in that loop so when ever you push the button it sends something out. The receive program sits in a loop that looks for something on the receive pin, and displays it on the lcd connected to port b. If i could get this to work I could continue with my overall project. I attached the programs in a zip file for review.Thanks in advance!
Attachments
t.zip
(3.46 KiB) Downloaded 337 times

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:

Re: RS232 board

Post by Benj »

Hello

In your transmit program I would change the initial transmit value from 255 to 254 or less as 255 will not be accepted by the receiver.

On the receive program you will probably need to have a decision after your RS232 read that decide if the incoming byte is less then 255.

char < 255

A return value of 255 means that the macro timed out before a byte was received.

if it is then output the cursor and print ascii commands. This way you can also get rid of the 5second delay as the output data only changes when you receive valid data.

The overall config, clock speeds, baud rates etc in your program look ok. How do you have the hardware setup? do you have the rx pin connected directly to the tx pin or do you have some other hardware in between.

y0sh1matzu
Posts: 2
Joined: Fri Jan 29, 2010 9:11 pm

Re: RS232 board

Post by y0sh1matzu »

Hi,
As for the hardware setup, you are right. I just have a wire that connects the two pins. I'm gonna go make those changes and see what happens...

EDIT:
Ok, so I made the changes and it worked, kinda. At first I was having problems with it not receiving at all, and then it started to work but every now and then it would receive a charter but it was not the right one. Eventually, it worked with out a hitch. So, I do have to thank you for your help! I am confused as to why it acted up, any thoughts?

Feb 26, 2010:
I can always transmit and receive data, but there is a catch, every now and then some of the data is corrupted. so a quick run down of the two programs I'll be attaching. The program called 2T is a simple transmit program. there is a LCD connected to port b, and two switches connected to port a, for sending two sets of separate data. the data is a string that is 32 charters long. Overall, it sits in a loop waiting for the user to tell it what data to sent it. this is just one of many stepping stones in my over all senior project. the other program is named "2Mid - Terminal" this program first clears out its EEPROM, with a little "clearing" waiting screen, then it waits for a string of 32 charters long, and looks for a star * in location 25. once the information has been received, it separated out the string to individual charters and stores it in to the EEPROM. you see that happening by it displaying the separate charters on LCD 0. the program does a few other things that are not as important right now.

If you would rather avoiding going through my program thats cool, but then I still have a question. How would you go about throwing in error checking, parity, and all the other good error checking methods. Once again, many thanks! Your help has re-motivated me for working on my senior project.
Attachments
2Mid - Terminal.fcf
The receiver
(140.88 KiB) Downloaded 330 times
2T.fcf
The transmitter
(10 KiB) Downloaded 318 times

Post Reply