Re: UART自己會亂傳?!
|
||||
---|---|---|---|---|
資深會員
|
不是你的問題,請放心。
就改照著 errata 中所述的 workaround 方法來作就是。方法有很多種,任選一種合用或你喜歡的就好。 翻了一下 workaround 講的很白話,看不出有什麼疑難,照作就是。 errta 與 datasheet 有矛盾的地方,以 errta 為準。 如還有問題可再問。
發表於: 2009/11/27 7:04
|
|||
|
UART自己會亂傳?!
|
||||
---|---|---|---|---|
初級會員
|
小弟在這邊有點問題想請教一下
我在使用UART時傳送接受數據都正常,但是一開始前一兩個bit自己會無中生有跑出"0x00"或是"0xFF" mcu:pic18f4525, 震盪器:12Mhz mode:Asynchronous. BRGH:High speed. Asynchronous mode:Enables receiver. //-------------code------------------ TXSTA=0b00100100; RCSTA=0b10010000; SPBRG=12; //baud rate 57600 //-------------end------------------- ex:0xFF 0xFF 0x30 x031 0x32 但實際上接受的數據只有0x30,0x31,0x32前面兩筆自己跑出來的 @O@" 小弟有看了18F4525的Errata第34項Module: EUSART感覺這問題好像就是我發生的問題 Errata內文:In rare situations, one or more extra zero bytes have been observed in a packet transmitted by the module operating in asynchronous mode. The actual data is not lost or corrupted; only unwanted (extra) zero bytes are observed in the packet. 但是小弟有點不懂它work around的方式. 有請各位先進指點迷津...是哪個環節出了問題?
發表於: 2009/11/24 10:46
|
|||
God grant me the serenity To accept the things I cannot change; Courage to change the things I can; And wisdom to know the difference.
|
||||
|