MPLAB et RS232 Hard

Bonjour ,

est-ce que le simulateur MPLAB permet de simuler une entrée RS232 sur un PIC

16F876 ? et une sortie ?

Si vous avez un exemple ce serait parfait.

Merci d'avance

Reply to
free.fr
Loading thread data ...

On Dec 16, 8:50=A0pm, "free.fr"

MpLab est moins un simulateur qu'un IDE ...

Sur un uC la RS232 se r=E9sume =E0 un couple d'E/S s=E9rielles ( mis =E0 part les niveaux de tensions pour le hardware ) La plupart des compilateurs incluent des macros pour param=E9trer facilement les registres =E0 d=E9calages : nombre de bits de donn=E9es, vitesse, bits de start/stop, =E9ventuellement la parit=E9, timming du sampling, etc ...

En fait je ne vois pas ce que tu veux simuler puisque ca existe d=E9ja en natif sur un PIC ?

Reply to
Jean-Christophe

Bonjour,

Dans la doc du module de simulation (SIM) fourni avec MPLAB (hlpMPLABSIM.chm), il y a pas mal de choses, en voila des petits extraits. Pour le rs232 :

"Using a USART/UART For devices that have a USART or UART peripheral, there are two ways in which to simulate this operation:

Using the UART1 I/O Tab - USART/UART simulation may be enabled and set up using the UART1 IO tab of the Settings dialog (Debugger>Settings). For more on this tab, see UART1 IO Tab. Using SCL Stimulus - USART/UART simulation may accomplished using SCL stimulus to USART registers. For more on SCL stimulus, see Using Stimulus."

Et pour les I/O : "Pin Simulation - All Devices MPLAB SIM only simulates to the register level, not the pin level, e.g., RB0 represents the value in bit0 of the PORTB register, not the value on the pin named RB0. This makes sense as the simulator is a software model, and not actual device hardware."

--
cLx
Reply to
cLx

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.