FAT16_32 via SoftSPI

Harry
Moderator
Avatar
Gender:
Location: zwischen Augsburg und Ulm
Age: 59
Posts: 2080
Registered: 03 / 2003
Subject:

FAT16_32 via SoftSPI

 · 
Posted: 27.06.2020 - 15:08  ·  #1
Ich verwende gerade eine SD-Karte via Soft-SPI und habe folgendes festgestellt .....

funktioniert:
Code
  FAT16           = MMC_Soft, iData;
  F16_MMCPort     = PortA.3,PortA.1,PortA.2,PortA.0;
  F16_MMCspeed    = standard;               { standard, slow, fast             }
  F16_FileHandles = 1;
  F16_DirLevels   = 1;
  F16_StrLen      = 90;


Im Handbuch staht, daß das erlaubt ist:
Quote
Define
FAT16 = MMC_SOFT, iData;
F16_MMCport = PortX, SS, SCK, MOSI, MISO;


Das funktioniert aber nicht:
Code
F16_MMCPort     = PortA,3,1,2,0;


Will jemand danach schauen? :)

Gruss
Harry
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1372
Registered: 03 / 2005
Subject:

Re: FAT16_32 via SoftSPI

 · 
Posted: 27.06.2020 - 15:20  ·  #2
When you say it doesn't work, what do you mean? Doesn't compile or doesn't function?
Harry
Moderator
Avatar
Gender:
Location: zwischen Augsburg und Ulm
Age: 59
Posts: 2080
Registered: 03 / 2003
Subject:

Re: FAT16_32 via SoftSPI

 · 
Posted: 27.06.2020 - 15:44  ·  #3
Hello Merlin,

it does not compile.

Harry
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1372
Registered: 03 / 2005
Subject:

Re: FAT16_32 via SoftSPI

 · 
Posted: 27.06.2020 - 16:24  ·  #4
Bizzarely, I get the opposite;

Code
  F16_MMCPort     = PortA,3,1,2,0;


works, but

Code
F16_MMCPort     = PortA.3,PortA.1,PortA.2,PortA.0;


does not

Perhaps you should publish your full unit so we can see what the differences are.

Here is mine

Code
program Test;

Device = mega2560, VCC=5;

import SerPort1, FAT16;

define
  ProcClock      = 16000000;
  StackSize      = 512, iData;
  FrameSize      = 512, iData;
  SerPort1       = 19200, Stop1;
  RxBuffer1      = 128, iData;
  TxBuffer1      = 128, iData;
  FAT16           = MMC_Soft, iData;
  //F16_MMCPort     = PortA.3,PortA.1,PortA.2,PortA.0;
  F16_MMCPort     = PortA,3,1,2,0;
  F16_MMCspeed    = standard;               { standard, slow, fast             }
  F16_FileHandles = 1;
  F16_DirLevels   = 1;
  F16_StrLen      = 90;
  
Uses UFAT16;

Implementation

const

type

var
{$IDATA}

begin
  EnableInts;
  loop
  endloop;
end.
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 13   78   91 · Page-Gen-Time: 0.02719s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI