 |
 |
| View previous topic :: View next topic |
| Author |
Message |
ressas
Joined: 15 Nov 2019 Posts: 135
|
|
Posted: Sat Jul 11, 2020 4:28 am |
|
|
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: 9632 Location: Greensville,Ontario
|
|
Posted: Sat Jul 11, 2020 4:41 am |
|
|
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.... |
|
 |
|
|
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
|