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

AS5045 Hall Rotary with 18f46k22
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ressas



Joined: 15 Nov 2019
Posts: 135

View user's profile Send private message

PostPosted: Sat Jul 11, 2020 4:28 am     Reply with quote

Yes temtronic. my integrity produces similar values. I think it's properly working.


Ttelmah said:
Quote:

This is a big advantage of using the #USE SPI, since it will ensure the that clock rate does not exceed the maximum baud specified.


I just noticed that the PIC was frozen (!) During the run. My friend said there were such problems while working with spi. But as above, it actually needs to be reliable?
Did you experience similar problems while working with Spi?
I would like to state that I did not send data with rs232.
I print on the oled screen with i2c communication
temtronic



Joined: 01 Jul 2010
Posts: 9631
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Jul 11, 2020 4:41 am     Reply with quote

I looked at your code, 2-3 posts above and don't see anything that would cause the PIC to 'freeze'.

I did see a #use I2C() that doesn't seem to be needed. If so, I'd delete that line.

You should have a delay in your main() loop...
read sensor, display result, delay for 1 second
at least for testing/debugging

I presuming you're sending the data to a PC ? If so, the 'freezeup' could be Windows/PC caused.
You could add an LED and in main() have it 'toggle' every loop. This is a visual indicator that the PIC IS running the main() program.

You could have a hardware or EMI problem....
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
Page 2 of 2

 
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