Split from: Oled lcd 128*64 using I2c protocol interfacing with atmega16

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

Hello,

I am using ATmega16 controller for one of my project and I am using gsm sim800c and GPS my code is working but I want to toggle them that is for power saving purpose I want to switch grounds of my modules from my microcontroller and for this, I was using BC547 transistor but it's not working I had given ground in my code and I was switching them but they are not working.

Please Help,

 

Last Edited: Tue. Jun 26, 2018 - 04:20 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What does that have to do with your I2C question?

 

For a separate question, start a separate thread.

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: Tue. Jun 26, 2018 - 11:02 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello, I had now used I2c functions from peter fleury's I2C functions but still, nothing happened. What should I do?? 

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

What should I do?? 

Answer the questions in #2.

 

Follow the advice in #3 - check the status returns.

 

Use an oscilloscope or logic analyser to see what's happening on the wires.

 

Learn to debug your systems: https://www.avrfreaks.net/commen...

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: 1

BTW it is not wise to switch the grounds to your modules as you will get ‘sneak’ currents through the port pins. Switch the positive voltage.