General Category > General Discussion

How to read REG_ID register

(1/13) > >>

Geethanjali:
Hi ,


I understand I should read REG_ID value till it returns 0x7c in the document , can u provide any example for that, or any known good value to check the working of display.

Rudolph:
Reading from REG_ID already is reading a value that is known to be good.
The initialisation sequence is in the programming manual, EVE will not even answer on the SPI if there is no ACTIVE command first and even after the ACTIVE command it needs time to start.

There are a couple of libraries to talk to EVE but of course I advertise for my own.  8)
https://github.com/RudolphRiedel/FT800-FT813

Check out EVE_init() in EVE_commands.c for one example to bring up EVE.

BRT Community:
Hi Geethanjali,

Yes, as you mentioned Rudolph, there are a few steps needed to start-up EVE correctly including setting the clock settings (if you need them to be different from default) and then the active command followed by the read of REG_ID and awaiting the REG_CPU_RESET == 0;

There is a recommended start-up in the Programmers guide for whichever version of EVE which you use and also in the sample code and so you can use these for reference.

Here is an example waveform attached where we read the REG_ID. This is a BT816 in this case,

We take CS low to begin the transfer,
Then send the three byte address of REG_ID from the programmers guide with the most significant 2 bits as '0' which indicates to EVE that we are doing a read
Then send a dummy 0x00 byte (this only applies when doing a read)
And then a dummy 0x00 byte to get the result back. We are only interested in the data coming back on MISO
And finally, CS high again to end the transfer

Best Regards, BRT Community

Geethanjali:
 Hi ,

 What might be the reason for getting only 0 on MISO Line?

 Thanks in advance.

BRT Community:
Hello,

It may be that you have read the register value before the EVE IC has booted correctly.

We would recommend the following procedure on boot, note the while loop when reading REG_ID:


--- Code: ---    MCU_PDlow();                                                                // PD low                                                               
    MCU_Delay_20ms();
    MCU_PDhigh();                                                               // PD high
    MCU_Delay_20ms();
 
    Set ext clock here if required
    MCU_Delay_20ms();

    EVE_CmdWrite(FT81x_ACTIVE, 0x00);                                           // Sends 00 00 00 to wake FT8xx
   
    MCU_Delay_500ms();                                                          // 500ms delay (EVE requires at least 300ms here))
       
    // --------------- Check that FT81x ready and SPI comms OK -----------------
   
    while (EVE_MemRead8(REG_ID) != 0x7C)                                        // Read REG_ID register until reads 0x7C
    {
    }
     
    while (EVE_MemRead8(REG_CPURESET) != 0x00)                                  // Ensure CPUreset register reads 0 and so FT81x is ready   
    {
    }

--- End code ---

Best Regards,
BRT Community.

Navigation

[0] Message Index

[#] Next page

Go to full version