CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

USB with 18F2550
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
RaptorUK



Joined: 30 Apr 2019
Posts: 17

View user's profile Send private message

PostPosted: Thu May 09, 2019 8:50 am     Reply with quote

Ttelmah wrote:
Think about it. .


OK, I have, thanks for persevering with me . . . Embarassed

I've changed the code and now I'm not getting the Status data, but I'm pretty sure I know why, the 9bit going low may signify the end of the data stream not the start.

I can rework my code to address this and test again.
RaptorUK



Joined: 30 Apr 2019
Posts: 17

View user's profile Send private message

PostPosted: Thu May 16, 2019 2:18 am     Reply with quote

A quick update . . .

I modified my RD interrupt to read the data before checking for the 9th bit, this is now working correctly, I've confirmed that the 9th bit being low does actually signify the start of the data stream, I'm confident that this part of my code is now working well.

I ended up routing the comms through a relay to disable it when it wasn't needed, this has helped to the point that I can now complete a full sequence most of the time.

I had some I2C issues, my data transfer to the EEPROM would consistently fail with 42 pages left to write, I spent a day checking my code adding flashing LEDs here and there to find where things were locking up . . . it mad no sense, in the end I unlooped my SDA and SCL wires and my problem went away, I'll replace these wires with some twin core shielded cable in due course. I'll also rewire my comms cable with shielded wire.

Thanks again for the help.
Ttelmah



Joined: 11 Mar 2010
Posts: 19538

View user's profile Send private message

PostPosted: Thu May 16, 2019 2:29 am     Reply with quote

Well done. Glad you have it working.

Wiring, when handling signals that are reasonably 'fast', can be much more
important than many realise.
When you say 'twin core', remember that normal 'microphone' twin core
does not provide shielding between the cores, and if the distance is more than
a very few inches, termination should really be used...
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group