Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Anti rebots sense interrupcions
- boto_ant = 0;
- if (boto && !boto_ant)
- {
- __delay_ms(10);
- if (boto)
- {
- tractament_boto();
- }
- }
- boto_ant = boto
- //Anti rebots amb interrupcions
- RSI()
- {
- if (INT1IE && INT1IF)
- {
- if (boto)
- {
- INT1IE = 0;
- tractament_boto();
- }
- }
- INT1IF = 0;
- }
- main()
- {
- if (INT1IE == 0)
- {
- __delay_ms(s);
- INT1IE = 1;
- INT1IF = 0;
- }
- }
Add Comment
Please, Sign In to add comment