serial communication

Go To Last Post
22 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hi ,

 

im using atmega328pb mcu with a6 module, ive attached the schematic of my board ,

i wanted to check the a6 module is working by giving AT commands through putty serial and a usb to serial converter, i tried it by connecting tx rx gnd of ftdi to j6 test points on my board.

the putty terminal wont work, what am i missing here ?

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What is an "A6" module? Is it a GSM device? Your schematic does not seem to show much. For example, where is the module, how is it powered, and what are the connections between the MCU and the A6 device? Yes, I could probably find them, but some are off the edge of the image.

 

Have you verified whether or not there is any serial data on the UART TX and RX lines?

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yup its a gsm module , check out the second attachement

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is no second attachment!

 

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Rather than attach the schematic, it's clearer if you embed it in the post - where we can actually see it.

 

Instructions here: https://www.avrfreaks.net/comment...

 

udayAKUMAR123 wrote:
yup its a gsm module

Go on - how about giving full make & model? And link to a datasheet?

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ensure you connect tx to rx & rx to tx, otherwise won't work. You don't show the FTDI chip, so who knows what you did

 

 

the putty terminal wont work, what am i missing here ?

how about the right baud rate? 

When in the dark remember-the future looks brighter than ever.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:
ensure you connect tx to rx & rx to tx

Not necessarily.

 

Strictly, a GSM module or modem is a DCE and, at a DCE, "TXD" is an input.

 

http://www.ece.ubc.ca/~edc/464/lectures/lec14.pdf

 

This is because the original RS232 specification defined the connection circuits - not the pins on the device:

 

The TXD circuit is the connection which carries the data to be transmitted from the DTE to the DCE - thus it is an output from the DTE, and an input to the DCE.

 

See the table here: https://en.wikipedia.org/wiki/RS-232#3-wire_and_5-wire_RS-232

 

Also: https://en.wikipedia.org/wiki/RS-232#Connectors

 

 

See also: https://www.avrfreaks.net/comment...

 

 

This convention is not well respected nowadays, so you just have to check specifically whether the pin marked "Tx" is actually an input or an output.

 

 

udayAKUMAR123 wrote:
the putty terminal wont work

What do you mean, "won't work" ?

 

avrcandies wrote:
how about the right baud rate?

Wrong baud rate generally results in "garbage" characters being displayed; eg,

 

Baud Mismatch

See: https://learn.sparkfun.com/tutorials/serial-communication

 

#DteDce

 

EDIT

 

Add Wikipedia links

 

EDIT 2

 

and old topic link

 

EDIT 3

 

Note that V.24 takes the same approach in defining "Interchange Circuits":

  • CT103 is equivalent to TXD - which is an output from the DTE and an input to the DCE;
  • CT104 is equivalent to RXD - which is an input to the DTE and an output from the DCE.

https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-V.24-199303-S!!PDF-E&type=items

 

ITU-T V.24 wrote:

Circuit 103 – Transmitted data

Direction: To DCE

The data signals originated by the DTE:

  1.  to be transmitted via a data channel to one or more remote data stations;
  2.  to be passed to the DCE for maintenance test purposes under control of the DTE; or
  3.  for the programming or control of serial automatic calling DCEs,

are transferred on this circuit to the DCE.

 

 

Circuit 104 – Received data

Direction: From DCE

The data signals generated by the DCE:

  1.  in response to data channel line signals received from a remote data station;
  2.  in response to the DTE maintenance test signals; or
  3.  in response to (or as an echo of) programming or control signals from the DTE where a serial automatic calling facility is implemented in the DCE,

are transferred on this circuit to the DTE.

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Fri. Dec 29, 2017 - 05:05 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ensure you connect tx to rx & rx to tx

I'm referring to connection between the AVR & the FTDI chip. 

 

This convention is not well respected nowadays, so you just have to check specifically whether the pin marked "Tx" is actually an input or an output.

Sadly, you are quite correct---must always check!  

When in the dark remember-the future looks brighter than ever.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:
I'm referring to connection between the AVR & the FTDI chip.

Ah - OK.

 

But the OP might still want to check the connections to the GSM thingy - to ensure "Tx" and "Rx" are correct ...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

here's the schematic of a6

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But that is surely just the "module"? The important schematic is how the module connects to the AVR

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In #6, I wrote:
Rather than attach the schematic, it's clearer if you embed it in the post - where we can actually see it.

 

Instructions here: https://www.avrfreaks.net/comment...

 

Like this:

 

 

and you still haven't answered the other questions:

 

I wrote:
how about giving full make & model? And link to a datasheet?

avrcandies wrote:
how about the right baud rate?

I wrote:
check the connections to the GSM thingy - to ensure "Tx" and "Rx" are correct ...
 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I guess that would be via the 'GSM_TX0' and 'GSM_RX0' off-sheet connectors?

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There's a barely legible company name on that "mENSMART Wireless Module Circuit" - looks like: http://mathiimigaltech.com/

 

Do you work for this company, or are they just the module manufacturer?

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

that "mENSMART Wireless Module Circuit" appears to show two UARTs connected in parallel:

 

 

In particular, connecting two outputs together is not going to work.

 

Presumably, some of those resistors are (or should be) not fitted ... ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i removed those jumper resistors still no improvement

 

a6 datasheet

 

https://www.google.co.in/url?sa=...

 

baud 9600

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

udayAKUMAR123 wrote:
i removed those jumper resistors

which jumper resistors, exactly?

 

If you removed them all then, obviously, it won't work!

 

And still no answers on the other questions:

 

  • baud rate?
  • ensure "Tx" and "Rx" are correct?
  • Do you work for "Mathiimigal Tech", or are they just the module (or board or "unit") manufacturer/supplier - or what?

 

EDIT

 

clarify "manufacturer"

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Sat. Dec 30, 2017 - 01:57 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That datasheet doesn't help to clarify the directions of "TXD" and "RXD" - so you're going to have to do that some other way.

 

But the datasheet does tell you that they are 2.8V 

 

Your schematic shows the microcontroller is 3.3V - so you're taking a bit of a risk there ...

 

You did prototype this before making a PCB, didn't you ... ?

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:
Strictly, a GSM module or modem is a DCE

Same applies to a WiFi module ...

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

https://alselectro.wordpress.com...

 

 

this guy has connected to arduino .

 

no prototype

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

udayAKUMAR123 wrote:
no prototype

Time to start one, then!

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What kind of goofballs name a part the "A6"---makes me wonder if I'd ever buy anything from such a place.  That's not much of a search filter.  How about a part called "G" & do a search for that?

In any case, since it is described as having "uart pins", I believe you need to hook txd to rxd 

When in the dark remember-the future looks brighter than ever.