Hi all! I need to work with RTC DS1305 with Quartus (vhdl), can anybody show me some examples? thnx
Max Fed wrote: > RTC DS1305 Excerpt from datasheet: Supports Motorola SPI Then have a look at this (with google translator): http://www.lothar-miller.de/s9y/categories/45-SPI-Master
Guest
#4076389
Lothar Miller wrote: > Then have a look at this (with google translator): > http://www.lothar-miller.de/s9y/categories/45-SPI-Master Lothar, thank you for your code! One more question: Excerpt from datasheet:
1 | |
2 | |
3 | |
4 | |
So, how I write 0-s in seconds? Can you write in 2-3 lines of code? And I'll understand all :))
maxfed wrote: > So, how I write 0-s in seconds? Have a look at "Figure 6. SPI SINGLE-BYTE WRITE" You will need a 16 bit transfer with first byte is the address x"80" and the second byte is x"00". When you use my SPI master as a component in your toplevel design, then you have just to write:
1 | |
2 | |
It gets more tricky if you want to access several registers one after the other, because this successive access must be done by a state machine: steps are always the same: config a transmission, start the transmission, wait for the transmissions end, then config a transmission, start it, wait for its end, and so on.
Reply
Please log in before posting.