--_003_4F0E9498C8C542F4B11FB14ADB46C03Eivp1_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all, another tedious but eventually illuminating day at the bench ......... After much trial and error mov #0xff,w0 ;supply CLK, wait for response call send_w0 ;with SDO high (FF data) bclr SPI1STAT,#SPIROV ;*** must clear overflow flag **= * btss SPI1STAT,#SPIRBF ;before test for full rx buffer bra $-2 mov SPI1BUF,w2 ;read buffer mov #0x30,w0 ;add #30 for display add w0,w2,w0 mov w0,[w5++] ;store in RAM for display later The solution that seems to work is clearing SPIROV before reading the receive buffer. Every time. Even though the previous read is meant to prevent SPIROV being set, ie there is no overflow to report because the previous data has been read "SPIROV =3D 1 ; A new byte/word is completely received and discarded. The user software has not read the previous data in the SPIxBUF register" I might be wrong but AFAICT this is not documented. It's not in any of the timing diagrams for example. Clearing SPIROV is mentioned as one of the steps when setting up the SPI module, but not that it must be used throughout. And I'm not sure exactly how SPIROV being set stops the SPIRBF being set. But if this another 33..x02 SPI silicon issue then who knows Now what I see on the LCD is / 1 /, which corresponds to 2F 31 2F, or FF 01 FF when the added #30 is taken off, and that's correct In one of the forum threads some guy said "I don't mind bug hunting". Personally I'm getting pissed off finding things wrong with products and manuals. Days are long and hard enough already thanks Joe --_003_4F0E9498C8C542F4B11FB14ADB46C03Eivp1_ Content-Type: image/gif; name="SPIROV.gif" Content-Description: SPIROV.gif Content-Disposition: attachment; filename="SPIROV.gif"; size=1735; creation-date="Fri, 12 Aug 2011 22:28:42 GMT"; modification-date="Fri, 12 Aug 2011 22:28:42 GMT" Content-Transfer-Encoding: base64 R0lGODlhiwF+AIAAAAAAAP///ywAAAAAiwF+AAAC/oyPqcvtD6OctNqLs968+w+G4kiW5omm6sq2 7gvH8kzX9o3n+s73/g8MCk+AYqAIMCCPxqXzmWQgk1Am1WjNLhvVbbcJxh6+YW05K8WS0WtuGXqN m6OI9torVsDnc/k27Xd2lwdCdXR4aKiYiLgopcS46CjJyBVZSZkJWXcZpUlZu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NxONtcog29y1nVqvy3XXV6tcdthBjK2xuTifDeofqM5Nd91234133qS6ISe9ciut dqlqD0544YYfjnjiii/OeOOOPw555JJP/k555ZZfjnnmmm/OeeeKwu156JWKTvqgoJeOeg6s5nFv 6q7v8LPPr8+uA9en0447V163nnvvLaTtte/C02wz8MMfz0sdrBOCfPPOPw999NJPX7Le1l+Pffba b899995/D36n1I9Pfvnmn49++uqvz3777r/Pefjyz09//fbXn8L9dMNP6e058586/7EMgKgTINUI GDoDQk1X4nMbAp+GLmSh7IEyUKDRajUxCr7AggFzFcxUwUENMgyCDCSYp4InQhWhIIR6+uDOUuia FT7LhcaDYQZYOML+mfCFNgSXDCVYvBz28Ib5m6HSYodDCibRgUNc3BKX2MSDhS+KVKyi/hWviMUs anGLXOyiF78IxjtBEYUkLGIYK8iCMTJRWGfUVhrfCMc2bjCOZryYxU4nviqBpYFb2p1PICakK7BR BWpU4xozBToXjmxj/YodtgYpxJBB8oeE/B3HErnDRarEkSJ75CTdxkmdEc+OpMyW3PymPHsBklyd 1KQkUTiM5TGtJYIUmB5PWa5C0rGOM9RkzJZkLED+TJFSc4PLKsY8NRyzlcB82S4jWEogZnJaxapX Hpd2SqtFsm2upKbskBGzCegympTsJcE+halohZKZnkRZq1b3N2WirZud7BTAxlnJZ5YwkymjCjFf aTuXYMybSEQaxVoZyQWWc6EM3Sc4bH25zn+6UmHthIDGmhlQdj4UoQ7TZ9Asea5souGE6wRVDjnJ NOZtUl3HaoLfVtVSLzCrXv/yKAkMacjL5ZSco8wnT8e3U5/ysqE9taj+jorUpCp1qUxdqhyfCtWo SnWqVK2qVa+K1axqlXIFAAA7 --_003_4F0E9498C8C542F4B11FB14ADB46C03Eivp1_ Content-Type: text/plain; name="ATT00001.txt" Content-Description: ATT00001.txt Content-Disposition: attachment; filename="ATT00001.txt"; size=208; creation-date="Fri, 12 Aug 2011 22:28:42 GMT"; modification-date="Fri, 12 Aug 2011 22:28:42 GMT" Content-Transfer-Encoding: base64 LS0gDQpodHRwOi8vd3d3LnBpY2xpc3QuY29tIFBJQy9TWCBGQVEgJiBsaXN0IGFyY2hpdmUNClZp ZXcvY2hhbmdlIHlvdXIgbWVtYmVyc2hpcCBvcHRpb25zIGF0DQpodHRwOi8vbWFpbG1hbi5taXQu ZWR1L21haWxtYW4vbGlzdGluZm8vcGljbGlzdA0K --_003_4F0E9498C8C542F4B11FB14ADB46C03Eivp1_-- .