AT25/45 DATAFLASH add programm on VB6 (C++)

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Code for reading a Sound file using the library mat.midlight.eu/wiki/index.php?title=SPI_DataFlash_Library

      Flash_get_info Flashbuffer(1)
      Setfont Color16x16
      Lcdat 94 , 4 , "Flash ID:" ; HEX(Flashbuffer(3)) ; " " ; HEX(Flashbuffer(4)) ; " " ; HEX(Flashbuffer(5)) ; " " ; HEX(Flashbuffer(6)), Violet , BLACK
      If Flashbuffer(4) = &H12 Then
      FLASH = "W25Q04" : SECT = 2047
      ELSEIf Flashbuffer(4) = &H13 Then
      FLASH = "W25Q08" : SECT = 4095
      ELSEIf Flashbuffer(4) = &H14 Then
      FLASH = "W25Q08" : SECT = 4095
      ELSEIf Flashbuffer(4) = &H15 Then
      FLASH = "W25Q16" : SECT = 8191
      ELSEIf Flashbuffer(4) = &H16 Then
      FLASH = "W25Q32" : SECT = 16383
      ELSEIf Flashbuffer(4) = &H17 Then
      FLASH = "W25Q64" : SECT = 32767
      ELSEIf Flashbuffer(4) = &H20 Then
      FLASH = "W25Q128" : SECT = 65535
      ELSE
      FLASH = "Unknow!" : SECT = 2047
      END IF
      ' Setfont Color8x8
      Lcdat 104 , 4 , "Flash:" ; FLASH , ORANGE , BLACK
      FOR Address = 0 TO SECT
      Flash_beginread Address ' , Flashbuffer(1) , 256
      FOR N = 1 TO 256
      Flashbuffer(N) = Flash_readbyte()
      D = Flashbuffer(N)
      Pwm1B = D
      Waitus 51 ' 14745600Hz
      NEXT N
      NEXT Address
      Flash_endread