Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

DS1307 RTC and ATmega8A

Status
Not open for further replies.

konradIC13

Member
Im connecting DS1307 with my ATmega8A and i have question.

Does DS1307 pins SCL and SDA must be connected to ATmega8A PC5 (SCL) and PC4 (SDA) or they can be connected to other ATmega8A pins?
 
If you don't mind implenting the spi protocol in software rather than hardware, then you surely can use any other pins you like.
 
yes, as kubeek says, you can hook them to any pins you want. The difference is, the software necessary. If you don't use the spi port on the ATMEGA, then you have to 'bit bang' the serial data transfer. If you use the spi port, you can just send data through the serial registers and implement the interrupt features.
 
I'm a little confused.
The DS1307 Chip has an I²C Interface?!
So the pins should be conected to the TWI Pins SDA SCL.
SPI normally uses the Pins MISO MOSI and SCK and !CE.
I would suggest you to use the TWI hardware interface.
It works faster and is easier to use than a software solution.
 
Thanks, i was just curious about it, all sites i saw it was connected to SDA and SCL but noone really explained why it was like that, and what would be required to connect it elsewhere.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top