When I touch SCL pin in my project the program will be pause, it means the LED toggling loop in while loop will be discard.why?
can every body help me?
Don't touch the pin then, why do you feel the need to touch it?
Ampertronics Pty. Ltd.
* Electronic Design * Custom Products * Contract Assembly
Your body works as an antenna. When you touch the pin you inject 50/60Hz as well as other noise into the pin. At a guess, it might be that you don't have the correct pull up resistors on the SCL/SDA pins. Should be around 2k2 methinks.
I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie
"The critical shortage here is not stuff, but time." - Johan Ekdahl
"Step N is required before you can do step N+1!" - ka7ehk
"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman
"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?" - Lee "theusch"
Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-) - Source Unknown
Please Read: Code-of-Conduct
Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user
© 2020 Microchip Technology Inc.