It's kinda quiet here...
I am currently trying to make audioplayer work on a PFS154.
However, the example does not work at all. After probing on the SPI line I found that not only the timing is a mess, the padauk is driving the MISO pin which it needs to be listening to instead of driving.
I am wondering this might be a compiler issue since I can't see any pin manipulation on the MISO pin.
Do you use a recent version of SDCC?
I learned the other day that assembler syntax for IO commands was changed around July 2021 (e.g. "mov.io IOREG, A" instead of the previous "mov IOREG,A").
=> Recent SDCC versions (snapshot / compiled from source) will most likely produce defect output when assembler language is included in your source code.
You should check the compiler output for warnings about IO register forced to be in memory... (unfortunately the will not be shown with default settings)
To fix this you only need to find all assembler code which contains MOV, T0SN, T1SN, XOR which have an IO register as source or destination. The new syntax for them is "mov.io / t0sn.io / t1sn.io / xor.io"
JS
P.S: Unfortunately updating all existing projects right now is not a good idea, since the stable release version of SDCC does not support the new ".io" syntax :-(
In case you mean the "audioplayer" from showcase projects, you need to change in "pdkspi.c" the assembler function "pdkspi_sendreceive":
uint8_t pdkspi_sendreceive(uint8_t s)
{
__asm
mov a, #8 ; loop 8 times
1$:
set0.io _ASMS(SPI_PORT), #(SPI_OUT_PIN) ; SPI-OUT = 0
t0sn _pdkspi_sendreceive_PARM_1, #7 ; s.7==0 ?
set1.io _ASMS(SPI_PORT), #(SPI_OUT_PIN) ; SPI-OUT = 1
set1.io _ASMS(SPI_PORT), #(SPI_CLK_PIN) ; SPI-CLK = 1
sl _pdkspi_sendreceive_PARM_1 ; s<<=1
t0sn.io _ASMS(SPI_PORT), #(SPI_IN_PIN) ; SPI-IN==0 ?
set1 _pdkspi_sendreceive_PARM_1, #0 ; s.0=1
set0.io _ASMS(SPI_PORT), #(SPI_CLK_PIN) ; SPI-CLK = 0
dzsn a ; loop--
goto 1$ ; loop again if>0
__endasm;
return s;
}