Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 19:21 24 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Dontronics Maximite Serial Ports

Author Message
grbl
Newbie

Joined: 01/12/2011
Location: Australia
Posts: 4
Posted: 06:58am 01 Dec 2011
Copy link to clipboard 
Print this post

Hi all. This is my first post.
I recently purchased the Dontronice Maximite and a Dual RS232 board from Hamfield. Everything works as it should except for the RS232 output data. It is all garbage.
I have tried different firmware versions, checked for bad solder joints, and examined the signal levels at the ports on a CRO- +/- 5v. All looks good. Has anyone had this problem and, more importantly, found a solution
 
Budgebrewer
Newbie

Joined: 20/11/2011
Location: Australia
Posts: 3
Posted: 08:09am 01 Dec 2011
Copy link to clipboard 
Print this post

I've just been reading Geoff's article in this month's SC.
I'm guessing this would have everything to do with the reversal of Hamfield's 26-pin I/O compared with that of the MM ?
A reversed interconnecting cable might be the go.
 
ajkw
Senior Member

Joined: 29/06/2011
Location: Australia
Posts: 290
Posted: 10:02am 01 Dec 2011
Copy link to clipboard 
Print this post

Or perhaps mismatched baud rates. I know this might seem obvious but it is sure way to get garbage from a serial port.

Regards,
Anthony.
 
djuqa

Guru

Joined: 23/11/2011
Location: Australia
Posts: 447
Posted: 10:43am 01 Dec 2011
Copy link to clipboard 
Print this post

  ajkw said   Or perhaps mismatched baud rates. I know this might seem obvious but it is sure way to get garbage from a serial port.

Regards,
Anthony.

My thoughts exactly.
Incorrect connection would more likely give no output rather than garbage.

Edited by djuqa 2011-12-02
VK4MU MicroController Units

 
rhamer
Senior Member

Joined: 06/06/2011
Location: Australia
Posts: 174
Posted: 11:15am 01 Dec 2011
Copy link to clipboard 
Print this post

  Budgebrewer said   I've just been reading Geoff's article in this month's SC.
I'm guessing this would have everything to do with the reversal of Hamfield's 26-pin I/O compared with that of the MM ?
A reversed interconnecting cable might be the go.


For the record my connectors are not reversed per the original silicon chip published circuit, and the one published with the Altronics kit.

The reversal was actually in Geoff's build of the Maximite, and his solution was to just change the circuit to match the reversed connector.

This was the subject of a long debate very early on, and as I was the only one with hardware in the field, I lost.

The solution is simple and can be solved in any one of three different ways, but unfortunately it is now made to appear that my boards are incompatible.

This is absolutely incorrect, you just have to use the correct cable and they are 100% compatible.

Also the reason I chose to continue manufacturing them this way was to avoid even more confusion with 2 versions of my boards, especially as the fix is so simple.

Why this was such an important point to make in the latest Silicon Chip article I don't know, but I would have been nice if the real cause was mentioned instead of insinuating that it was a fault in my design.

All this has now done is give me a full time job answering email queries from justifiably confused purchasers about something that is not an issue in practice and well explained in my documentation.

Regards

Rohan Edited by rhamer 2011-12-02
Rohan Hamer
HAMFIELD Software & Hardware Solutions

Makers of the Maximite Expander.

http://www.hamfield.com.au
 
rhamer
Senior Member

Joined: 06/06/2011
Location: Australia
Posts: 174
Posted: 11:32am 01 Dec 2011
Copy link to clipboard 
Print this post

  grbl said   Hi all. This is my first post.
I recently purchased the Dontronice Maximite and a Dual RS232 board from Hamfield. Everything works as it should except for the RS232 output data. It is all garbage.
I have tried different firmware versions, checked for bad solder joints, and examined the signal levels at the ports on a CRO- +/- 5v. All looks good. Has anyone had this problem and, more importantly, found a solution


As the others have posted, the most likely cause is mismatched settings between the Maximite and whatever you are communicating with.

Can you describe your setup, including which port your using, it's settings and what you are receiving the garbage data on.

Also how are you powering the interface board? The RS-232 voltage swings should be more like +-12v.

And lastly, are you seeing any activity on the LED's for that port?

Regards

Rohan
Rohan Hamer
HAMFIELD Software & Hardware Solutions

Makers of the Maximite Expander.

http://www.hamfield.com.au
 
grbl
Newbie

Joined: 01/12/2011
Location: Australia
Posts: 4
Posted: 10:42pm 01 Dec 2011
Copy link to clipboard 
Print this post

Thanks for the input.
All the above are relevant and I think I have covered them all. I have the reversed cable and it works fine, and the baud rates are correct along with the other comport parameters.
I have activity on the leds and +/-6v on the rs232 port pins. The power is from a 9vDC supply. I thought the signal should be +/- 12 but it should work at that level anyway. It is the same on both ports.

Port Parameters are 9600,n,8,1 and I have looked at the data out with a couple of different terminals-,a hardware hand terminal and Terraterm on the PC. I have also tried different baud rates and even different rates on the send/ receive ends but no luck.
 
grbl
Newbie

Joined: 01/12/2011
Location: Australia
Posts: 4
Posted: 11:37pm 01 Dec 2011
Copy link to clipboard 
Print this post

Further testing reveals the following. If the following code is used

90 open "com1:9600" as #1
100 dat1$="b"
110 print #1,dat1$;
115 close #1
120 goto 90

i can transmit 1 character continuously. If the semicolon is removed from line 110 I get garbage. If dat1$ is more than 1 character long I get garbage.
 
rhamer
Senior Member

Joined: 06/06/2011
Location: Australia
Posts: 174
Posted: 01:12am 02 Dec 2011
Copy link to clipboard 
Print this post

try using this code and tell me what happens.

90 open "com1:9600" as #1
100 dat1$="Hello"
110 print #1,dat1$;
111 pause 1000
112 goto 110
115 close #1


You might have to check the pause command syntax.

Regards

Rohan
Rohan Hamer
HAMFIELD Software & Hardware Solutions

Makers of the Maximite Expander.

http://www.hamfield.com.au
 
grbl
Newbie

Joined: 01/12/2011
Location: Australia
Posts: 4
Posted: 02:07am 02 Dec 2011
Copy link to clipboard 
Print this post

Thanks Rohan
I am getting some sense now. There is clearly some crucial timing between the "PRINT" command and when the port is to be closed and further code at least in this instance. It seems to be the "PRINT_ CLOSE- OPEN port sequence that can cause the problems. I can now get data out of both ports.

BTW your serial board works fine with the cable made as you describe.
 
rhamer
Senior Member

Joined: 06/06/2011
Location: Australia
Posts: 174
Posted: 02:24am 02 Dec 2011
Copy link to clipboard 
Print this post

  grbl said   Thanks Rohan
I am getting some sense now. There is clearly some crucial timing between the "PRINT" command and when the port is to be closed and further code at least in this instance. It seems to be the "PRINT_ CLOSE- OPEN port sequence that can cause the problems. I can now get data out of both ports.

BTW your serial board works fine with the cable made as you describe.


Normally you open a port do all the sending and receiving and after you have finished, close it.

However in your example above, I suspect the issue is one of port speed.

You are trying to push data out the serial port at a much much slower rate than you are generating it in your loop.

I dont know how the MM-Basic uarts work behind the scenes, but it is very likely you are overflowing the TX buffer.

Anyway, i'm glad you are making progress.

Cheers

Rohan
Rohan Hamer
HAMFIELD Software & Hardware Solutions

Makers of the Maximite Expander.

http://www.hamfield.com.au
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024