[elektro] PIC32 flag probléma
F-I
flaist at gmail.com
Thu May 3 23:56:06 CEST 2012
Szia!
Bocs, hogy csak a végén kotyogok bele, de PIC16-, PIC18-nál sem lehet a
TXIF-t szoftveresen törölni.
Csak akkor lesz nulla, ha a TXREG tele van.
A TXIE törlésével kell az adás IT leállítani.
Ha mégis úgy kezelted ahogy írod, akkor ott komoly bizonytalanságok
keletkezhettek.
PIC16
This interrupt can be enabled/disabled by setting/clearing enable bit TXIE
( PIE1<4>). Flag bit TXIF will be set, regardless of the
state of enable bit TXIE and cannot be cleared in software.
It will reset only when new data is loaded into the
TXREG register.
PIC18
16.1.1.4 Transmit Interrupt Flag
The TXxIF interrupt flag bit of the PIR1/PIR3 register is
set whenever the EUSART transmitter is enabled and
no character is being held for transmission in the
TXREGx. In other words, the TXxIF bit is only clear
when the TSR is busy with a character and a new
character has been queued for transmission in the
TXREGx. The TXxIF flag bit is not cleared immediately
upon writing TXREGx. TXxIF becomes valid in the
second instruction cycle following the write execution.
Polling TXxIF immediately following the TXREGx write
will return invalid results. The TXxIF bit is read-only, it
cannot be set or cleared by software.
----- Original Message -----
From: "Balla Zoltán" <sdrlab at yandex.ru>
To: <elektro at tesla.hu>
Sent: Thursday, May 03, 2012 3:05 PM
Subject: Re: [elektro] PIC32 flag probléma
> Feladó: "potyo" <potyo.ada at gmail.com>
>> Mármint milyen eddigihez képest? PIC16-hoz képest?
>>
> Nem csak....32 bitesig mindegyik így működött...
>
> Zoli
>
> -----------------------------------------
> elektro[-flame|-etc]
More information about the Elektro
mailing list