SparkFun Electronics will be closed in observance of memorial day on Monday, May 29th. We will resume normal business hours on Tuesday, May 30th. Any orders placed after 2pm Mountain Time on Friday, May 26th will process and ship out on Tuesday, May 30th.

Member #369860

Member Since: October 15, 2012

Country: United States

  • I want to read and write registers of L6470. Do i need to make the Flag pin high or low? another question is i cannot read any register , i cannot read signal no MISO line ? any suggestions?

  • I am using SPi bus in the following way to read and write L6470 registers. it would be nice if someone could tell me what mistake i am doing. I cannot get signal on SDO pin when i try to read any register

    void spic_init_config_L6470() { PORTC.DIRSET = SPIC_CS ; PORTC.DIRSET = SPIC_MOSI ; PORTC.DIRSET = SPIC_SCK ;
    // Configuration of SPI bus for port C
    SPIC_CTRL |= SPI_ENABLE_bm |SPI_MASTER_bm ; // Set Enable bit in control register using bit mask and SPI in master mode SPIC_CTRL |= SPI_MODE_3_gc; // Set SPI mode. //SPIC_CTRL |= SPI_PRESCALER_DIV4_gc; // Choosing the freq, we have chosen the max freq

    //SPIC_CTRL |= SPI_PRESCALER_DIV16_gc;                           // Choosing the freq, we have chosen the max freq
    SPIC_CTRL |= SPI_PRESCALER_DIV64_gc;                           // Choosing the freq, we have chosen the max freq
    //SPIC_CTRL |= SPI_CLK2X_bm;                                    // Doubling the SPI speed (SCK freq) in Master Mode      
    SPIC_INTCTRL |= SPI_INTLVL_OFF_gc ;                           // Disabling the interrupt 
    SPIC_STATUS  |=0;  


    dSPIN_rx_data =dSPIN_Get_Param(dSPIN_ACC);

    uint32_t dSPIN_Get_Param(dSPIN_Registers_TypeDef param) { uint32_t temp = 0; uint32_t rx = 0;

    /* Send GetParam operation code to dSPIN */
    temp = dSPIN_Write_Byte(dSPIN_GET_PARAM | param);         // param is the respective register address listed in table 12 of data sheet 
    /* MSB which should be 0 */
    temp = temp 
  • I am using L6470 chip and trying to read and write any register.if i want to write ACC register, i need to send three bytes. First byte is the command byte and then following are two bytes to write the value on register. My question is do i need to make the chip select pin high after i write each byte ? or i should write all three bytes and then make the chip select pin high? i use actually both ways and tried to write the value and then i tried to read it , i could not get any signal on SDO line. I can only see CS.CK and MOSI pins. I am using Atxmega 1283

No public wish lists :(