Forum: Mikrocontroller und Digitale Elektronik SPI Simulation MPLabX


von Robert C. (anykey)


Lesenswert?

Hallo,
ich möchte meinen SPI Code im Simulator testen.
Könnte mir jemand sagen wie ich das anstelle?
Ich verwende MPLab X und einen PIC 18F25k22.

Vielen Dank im Voraus.
Gruß Robert

von Witkatz :. (wit)


Lesenswert?

Robert C. schrieb:
> ich möchte meinen SPI Code im Simulator testen.
> Könnte mir jemand sagen wie ich das anstelle?
> Ich verwende MPLab X und einen PIC 18F25k22.

Das SSP Modul wird nicht simuliert.
Zitat aus der MPLAB X Simulator Help:
> General Limitations
> ...
> For devices with the listed peripherals, these peripherals are NOT supported:
> ...
> - Serial I/O (i.e., SSP including I2C and SPI). As a result, the SSPSTAT
> register has been made readable and writable. You can use stimulus to
> emulate many of the signals of SPI and have firmware read data as if it
> was SPI.

Was soll der Zweck der Simulation sein? Du kannst in den 
Sende/Empfangsroutinen einen Breakpoint setzen und ins SSP1STAT/SSP1BUF 
was reinschreiben um den Rest des Programms zu testen. Langt das?

von Robert C. (anykey)


Lesenswert?

Witkatz :. schrieb:
> Robert C. schrieb:
>> ich möchte meinen SPI Code im Simulator testen.
>> Könnte mir jemand sagen wie ich das anstelle?
>> Ich verwende MPLab X und einen PIC 18F25k22.
>
> Das SSP Modul wird nicht simuliert.
> Zitat aus der MPLAB X Simulator Help:
>> General Limitations
>> ...
>> For devices with the listed peripherals, these peripherals are NOT supported:
>> ...
>> - Serial I/O (i.e., SSP including I2C and SPI). As a result, the SSPSTAT
>> register has been made readable and writable. You can use stimulus to
>> emulate many of the signals of SPI and have firmware read data as if it
>> was SPI.
>
> Was soll der Zweck der Simulation sein? Du kannst in den
> Sende/Empfangsroutinen einen Breakpoint setzen und ins SSP1STAT/SSP1BUF
> was reinschreiben um den Rest des Programms zu testen. Langt das?
Danke für den Hinweis, und ja das langt völlig.

Gruß Robert

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.