Close

FRAM first c code works

A project log for Merlin

68000 Retro Super Computer

Matthew PearceMatthew Pearce 12/05/2021 at 16:100 Comments

I have created a simple c-library to read and write to the fram. So I know my PMOD interface to the arty is working correctly. Next step is to write a more complicated hdl to allow the fram to be accessed directly via a memory location rather than with c code. With that in place I will be able to run the rom directly from the FRAM 

fram_spi->begin();

    uint8_t test = fram_spi->read8(0x0);
    printf("\r\nRestarted %d times\r\n",test);

    uint8_t test2 = fram_spi->read8(0x1);
    printf("\r\nfirst letter 0x%x\r\n",test2);

  // Test write ++
  fram_spi->writeEnable(true);
  fram_spi->write8(0x0, test+1);
  fram_spi->writeEnable(false);

  fram_spi->writeEnable(true);
  fram_spi->write(0x1, (uint8_t *)"FTW!", 5);
  fram_spi->writeEnable(false);

    printf("\r\ndone\r\n");

Discussions