Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/21/04 09:04
Read: times


 
#77779 - problem with SPI & MAX6662 (at89s8252)
I have problem with implementing MAX6662 chip. I have already interfaced ds1306 rtc with 3wire serial interface and it works. The problem is that the max6662 uses non usual spi interface. There are no mosi/miso pin instead of this there is one bi-directional pin DQ for data transfers. Can this chip be interfaced to this microcontroller ? How to do that (mayby use tri-state buffer`s) ? For first i connected mosi and miso line from uC together and use this code:


void spi_wr(unsigned char d)
{
   SPDR = d;
   while ((SPSR & 0x80) == 0)
      ;
}

unsigned char spi_rd(void)
{
   unsigned char v;
   SPDR = 0xFF;
   while ((SPSR & 0x80) == 0)
      ;
   v    = SPDR;
   return (v)
}



And the code for gathering temp:


  ...
  CS = 0;
  spi_wr(0xC1);
  hi = spi_rd();
  lo = spi_rd();
  CS = 1;
  ...



This is not working. Second problem is that ds1306 uses two data lines and do not respond when lines is connected with each other.

Is there work around ? Or somebody know some spi temp. chip with normal spi interface ?

sorry for my broken
English
Lukasz Bajger

List of 12 messages in thread
TopicAuthorDate
problem with SPI & MAX6662 (at89s8252)            01/01/70 00:00      
   RE: problem with SPI & MAX6662 (at89s8252)            01/01/70 00:00      
      RE: problem with SPI & MAX6662 (at89s8252)            01/01/70 00:00      
         RE: problem with SPI & MAX6662 (at89s8252)            01/01/70 00:00      
      RE: problem with SPI & MAX6662 (at89s8252)            01/01/70 00:00      
         RE: problem with SPI & MAX6662 (at89s8252)            01/01/70 00:00      
            RE: problem with SPI & MAX6662 (at89s8252)            01/01/70 00:00      
               RE: problem with SPI & MAX6662 (at89s8252)            01/01/70 00:00      
                  RE: problem with SPI & MAX6662 (at89s8252)            01/01/70 00:00      
                     RE: problem with SPI & MAX6662 (at89s8252)            01/01/70 00:00      
                        RE: problem with SPI & MAX6662 (at89s8252)            01/01/70 00:00      
                           RE: problem with SPI & MAX6662 (at89s8252)            01/01/70 00:00      

Back to Subject List