In article <199708150255_MC2-1D2C-8BBD@compuserve.com>, Alex Barrett writes >I'm using the simulator in MPLAB 3.12 to simulate a UART async transmit on >a 16C65A. The simulator expects the TXSTA(TRMT) to be one way up, but the >hardware expects the opposite polarity. >Hence if I use a loop to wait for the previous transmit to finish, either >it simulates but locks up the PIC, or it works in practice but loops >forever in the simulation. >I've listed the code that works for the hardware, to simulate I'd have to >change the bit test to 'btfsc' > >< btfss TXSTA,TRMT > goto transmit > movf TMTDATA,W > movwf TXREG > retlw 0 >> > >Anyone else fallen foul of this one? > >* Alex_Barrett@iee.org ~ Norwich, UK I know this is not really the reply you where looking for but, have you ever used the Serial communications on the 16C65A within the simulator environment? As I have been told that the simulator does not simulate the SPI, but that shouldn't stop me from manual putting values into the SPI input buffer don't you think Carl -- Carl Wainwright, Design Engineer Tel +44 (0) 1635 584000 Controlware Ltd. Fax +44 (0) 1635 548098 Newbury, U.K. E-mail cwainwright@cware-dev.demon.co.uk