i need some expert guys support so I asked u help..
i enabled that macros in the main.. because I referred interrupt on change example from microchip website.... they told to open that
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
IOC is working fine..i selected positive edge detection and it is working fine for Switch pressing..
after switch pressing some times multiple times LED is toggling means looking like denouncing is happening...
how to avoid that denouncing in IOC..
because I need to switch only for final application
.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Whilst you are in the ISR handler. DIsable the interrupt, then do a simple loop with a delay and check the switch is still down, exit the loop and then Enable the interrupt before exiting the ISR handler.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the event handler/ISR. Turn off the IOC interrupt. Call a wait 10. Check the switch is depressed. Set a flag(a bit variable) to confirm that the event happened and 10ms later it was still depressed. The enable the IOC interrupt and exit the event handler/ISR.
There is no need for an additional timer unless you are being paid by the hour of coding ... in which case we can advise you to make this far more complicated. :-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i got approval for this concept.... but one more challenge is i need to disable the interrupt for perticular pin.... means if Port B 5 pin is generating IOC means i need to disable only 5 th pin and i should get IOC from B6 pin ...
how to handle?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i mean to say that....
using API only I am reading and writing but after writing...
target memory viewes will have data eeprom window..
that should update... pickit3 debugger i am using to write program..
anything i need to set in debugger??
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You want my help? Then, please do what I ask.
The main.c you posted cannot compile and therefore is invalid. Do not edit or comment main.c. Attach to the post - do not post within the post.
i need some expert guys support so I asked u help..
i enabled that macros in the main.. because I referred interrupt on change example from microchip website.... they told to open that
I am offering, but, you need to provide the info else I will be guessing.
Hi,
IOC is working fine..i selected positive edge detection and it is working fine for Switch pressing..
after switch pressing some times multiple times LED is toggling means looking like denouncing is happening...
how to avoid that denouncing in IOC..
because I need to switch only for final application
.
Excellent.
Whilst you are in the ISR handler. DIsable the interrupt, then do a simple loop with a delay and check the switch is still down, exit the loop and then Enable the interrupt before exiting the ISR handler.
can I achieve this by using timer interrupt?
how to proceed using timer interrupt ?
yes you can - this will make things overly complicated.
just use delay( 10 ).. then check the switch state. keep things simple.
hi,
can you explain me how to acheive it from your previous Post.
checking the switch status u r suggesting...
please tell me with proper steps starting from Switch press
Are you a student ? are we writing your homework?
i am employee of one company....
i am thinking of using interrupt but my technical head is not satisfied with my ideas
.so I am asking your help
Technical lead may not that wrong in terms of having an idea and not being able to implement and support. The idea is rather odd approach.
so many people suggest to use timer... so I told that...
using timer only 2 methods....
just please explain your idea..it could help me
As I said.
In the event handler/ISR. Turn off the IOC interrupt. Call a wait 10. Check the switch is depressed. Set a flag(a bit variable) to confirm that the event happened and 10ms later it was still depressed. The enable the IOC interrupt and exit the event handler/ISR.
There is no need for an additional timer unless you are being paid by the hour of coding ... in which case we can advise you to make this far more complicated. :-)
thanks yar
i got approval for this concept.... but one more challenge is i need to disable the interrupt for perticular pin.... means if Port B 5 pin is generating IOC means i need to disable only 5 th pin and i should get IOC from B6 pin ...
how to handle?
unset the flag for then port you are inspecting. then, set that specific port.
ok i understood..
flag variable i need to set in the interrupt ISR and need to use in the main function.
am i need to use it as extern or volatile??
means the variable type?
global variable.
thanks yar for your support.....
i need one more help u know how to write data in data eeprom using MPLAB MCC
In MCC add the 'Data EE Routines'. This will add all the apis.
You should be using
DATAEE_WriteByte(uint16_t bAdd, uint8_t bData)
andDATAEE_ReadByte(uint16_t bAdd)
The use of these two methods are very easy.Hi,
i am using above API for my application....
using data write i am writing 0x34 at 0xF000 address..
and after writing I am reading using read API for same address 0xF000...
i am receiving the updated value 0x34 in receive variable...
is it proper?? means I am not finding the updated value in data memory window...
but received variable is getting updated value..
please clarify me
No idea what you mean.
If you write 0x34 and then read 0x34 then this is good.
But, I am sure I am missing the issue here. Please restate.
i mean to say that....
using API only I am reading and writing but after writing...
target memory viewes will have data eeprom window..
that should update... pickit3 debugger i am using to write program..
anything i need to set in debugger??
I still do not understand.
Hi,
it is related to tool setting...
no worries i found solution