flowcode v6 rs232 problem with atmega2560

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

flowcode v6 rs232 problem with atmega2560

Post by maxtisc »

HELLO TO ALL
I write because I have struggled to run the modules for transmitting RS232.
the program is very simple and I just need to figure out how to use the various forms and is as follows:
I must convey to the computer and display a phrase like HELLO via hyperterminal or other similar programs, it all works in simulation but in practice do not I see anything on your pc.
I initially used to connect a cable with homemade cross and rx and tx gnd on pin 5, then I used a commercial crossover cable, to no avail. I have followed the various posts and tutorials you suggested but I get no results.
HW I used is the BIGAVR6 of MIKROE which is nothing more than an Arduino Mega only more expanded, where I can use an ATmega128 or a ATmega2560
I am sure that the port 232 of the pc runs having it tested with commercial equipment
I look forward suggestions

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: flowcode v6 rs232 problem with atmega2560

Post by Benj »

Hello,

Can you post your Flowcode file so far so we can have a look and hopefully spot what is causing the problem.

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: flowcode v6 rs232 problem with atmega2560

Post by maxtisc »

hello Benj
thanks for your time
unfortunately I can not attach the file, :( :( I do not understand if they are not qualified to do or if I do not follow the right path

suggestions?

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: flowcode v6 rs232 problem with atmega2560

Post by maxtisc »

hello bengj
thanks for your help but I can not attach the file because I can not find the button to attach the file, I have to be enabled by an administrator?

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: flowcode v6 rs232 problem with atmega2560

Post by maxtisc »

hello
anyone help me?

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: flowcode v6 rs232 problem with atmega2560

Post by kersing »

Below the text field for your message text and the buttons for "save", "preview" and "submit" are two tabs. The right one should read "Upload attachment". Select that tab and browse to the file, click on "add file".
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: flowcode v6 rs232 problem with atmega2560

Post by maxtisc »

thanks kersing
I can assure you that until now the buttons were not displayed
Now I hope someone staff can help me with my problem
Attachments
provarx232.fcfx
(5.79 KiB) Downloaded 284 times

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: flowcode v6 rs232 problem with atmega2560

Post by maxtisc »

Hello to all staf
Anyone help me?

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: flowcode v6 rs232 problem with atmega2560

Post by Benj »

Hello,

Are you connecting the pins of the microcontroller directly to a RS232 cable? Actual RS232 requires level shifting so that the 0V and 5V signals are translated into -12V and 12V respectively. If you look at the datasheet for our EB015 E-block then you will see the RS232 driver IC used to convert the voltages.

TTL RS232 is basically what the microcontroller is doing. You can get USB to serial converters that use TTL level RS232 and with this you would no longer need the driver IC.

You can get around the driver IC if needed using this circuit, bit hacky but I can confirm it works. The bits your looking at are D1, R1 and R2
http://bobblick.com/techref/projects/lc ... cdterm.gif

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: flowcode v6 rs232 problem with atmega2560

Post by maxtisc »

hello benj
of course not, as you can see from the attached file, the TTL signals are converted by MAX202, (similar to max232), and within the db9 port of my PC with a crossover cable
You can post a simple project for ATmega128 or 2560?
thanks
Attachments
Documento0.pdf
HW part on the transmission rs232
(214.77 KiB) Downloaded 273 times

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: flowcode v6 rs232 problem with atmega2560

Post by dazz »

Hi
Try the attached flowchart, i havent set any config data you will have to do that for yourself, let me know if it works as i cant test it, if it doesnt work then post a microC example for AVR and i will convert to flowcode
Regards
Dazz
test.fcfx
(5.55 KiB) Downloaded 266 times
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: flowcode v6 rs232 problem with atmega2560

Post by maxtisc »

Dazz thanks for your interest

I tried your flowchart, it does not work
I am attaching a file in mikroC so you can view it
I begin to think that I have a problem of type HW on the board but it seems strange that it is on both channels RS232, tomorrow I will verify with an oscilloscope the signals that come out.

thank
Attachments
UART1.c
(1.36 KiB) Downloaded 197 times

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: flowcode v6 rs232 problem with atmega2560

Post by dazz »

Hi
I will post it tommorow for you
As you have the big6 compile the c code and run it to see if it works as the mikro examples should work with the mikro board, if it does it rules out hardware, also what switches do you have switched on on the board etc
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: flowcode v6 rs232 problem with atmega2560

Post by maxtisc »

hello to all
I could check with a scope that is actually in the output db9 rs232 signal, the voltage of the square wave gets to + - 10v, could be a problem in the timing or synchronization? (fuses set wrong?)

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: flowcode v6 rs232 problem with atmega2560

Post by maxtisc »

I tested the card with a simple sample program MIKROE compiled with MikroC pro for avr, and everything works correctly, but I still have problems with FC6 output from the serial port (on RealTerm you only see unintelligible characters), also on relaterm shows "UART receiver framming error"
that there is a bug?

Brendan
Posts: 243
Joined: Tue Nov 27, 2012 12:53 pm
Location: Cambridge, UK
Has thanked: 140 times
Been thanked: 118 times
Contact:

Re: flowcode v6 rs232 problem with atmega2560

Post by Brendan »

Hello Maxtisc.

I noticed that the original file you posted actually had two instances of the RS232 component in the dashboard - one placed on top of the other, and both instances were using the same RS232 channel/pins.

Could this be something to do with it, I wonder ?

All the best,

Brendan

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: flowcode v6 rs232 problem with atmega2560

Post by maxtisc »

thanks Brendan for your interest
I changed into other files with only one instance but nothing has changed.
that to me would be a file that definitely works to understand where he is the error but it seems that after a month nobody is able to produce

thanks

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: flowcode v6 rs232 problem with atmega2560

Post by maxtisc »

This silence is disturbing

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: flowcode v6 rs232 problem with atmega2560

Post by maxtisc »

hello
has been reached over 400 views, but none of the staff has yet taken the trouble to give a full explanation, if my post was not interested in nobody would have reached such a number of views?
I paid (as all those who write on the forum), nearly 400 EUR for the product, but I do not receive assistance, my question would be very simple for creators of Flowcode, or are there other problems? I am very very very disappointed with that attitude.

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: flowcode v6 rs232 problem with atmega2560

Post by Benj »

Hello,

Sorry to hear your still having problems getting the RS232 working.

Not go that specific chip to hand so testing might be a bit of an issue, the RS232 is known to work ok on ATMega devices so I'm surprised its not ok on this device. Do you have access to a scope or anything similar which you could use to try and see if you are getting signals out of the transmit pin and to sanity check the baud rate.

Another thing you could try has come from a recently found bug on a ATXMega device. Try outputting a 1 to the transmit port pin using the output icon in single pin mode before calling the RS232 initialise function. If this works then I can apply this fix to the CAL code so you don't have to do it manually in your program in future.

Otherwise I will get the issue on the list and we will look for some hardware to allow us to test the problem.

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: flowcode v6 rs232 problem with atmega2560

Post by maxtisc »

hello benj
I made countless tests to try to run the serial port, finally I managed, the only way I've found is was to set the oscillator cal. internal RC oscillator in other ways the serial does not work. To transfer the program I use AVRFLASH, and set the fuse on AVRFLASH ( I do not know if this could be a problem), and disabling the option wraite on fc6 config on download.
I hope that in the next update can be made to work properly

Now I need the transmission at 485, hope for the best

thank you

Post Reply