Shop OBEX P1 Docs P2 Docs Learn Events
A file character reading challenge for SPin2 / Pasm experts. — Parallax Forums

A file character reading challenge for SPin2 / Pasm experts.

So lets say you have a file on your SD card and you need to check what byte is at position 75 in the file.

In Spin2 or PASM how could that be done.

Comments

  • Use Taqoz!
    75 sdc@

  • Just posted this FAT32 object to the OBEX. Tried to make it as simple to use as possible.

    CON
      _CLKFREQ = 80_000_000
      _SD_MISO = 58                   
      _SD_SCK  = 61                   
      _SD_MOSI = 59                   
      _SD_CS   = 60                   
    VAR
      byte  buffer[2048]
    OBJ
      sd : "SD card driver"
    PUB main()  | result
      if sd.mount(_SD_CS, _SD_MOSI, _SD_MISO, _SD_SCK)
        sd.openFile(string("filename.txt"))
        result := sd.readByte(75)
        debug(uhex_byte_(result))
    
Sign In or Register to comment.