Menu

PIC16F18857 and Interrupt-On-Change

jackjames
2019-09-06
2020-12-21
<< < 1 2 3 4 > >> (Page 3 of 4)
  • Megha Bhirade

    Megha Bhirade - 2020-11-24

    hi,
    i am using SLEEP () macro in pic controller.
    why it is not working the device after receiving IOC..
    if i commented sleep instructions means it will go to timer isr and setting the flag and that flag only I am using in main....
    if sleep instructions are there means it will not go to timer even though it is receiving ISR

     
  • Anobium

    Anobium - 2020-11-24

    How are you bringing out of sleep?

     
  • Megha Bhirade

    Megha Bhirade - 2020-11-24

    see i am using SLEEP () to enter in to sleep mode....

    after pressing switch it should generate IOC interrupt and wake up MCU

     
  • Anobium

    Anobium - 2020-11-24

    The external Interrupt should be used to wake. What port are you using?

     
  • Megha Bhirade

    Megha Bhirade - 2020-11-24

    No yar IOC also we can use. so many people suggested..
    i am using Port C 0 pin

     
    • Anobium

      Anobium - 2020-11-24

      Hook a signal into the ext int or move the portc.0 switch to the ext int port.

       
  • Megha Bhirade

    Megha Bhirade - 2020-11-24

    means I can't use IOC interrupt here?

     
  • Anobium

    Anobium - 2020-11-24

    If 'here' is portc.0 then you need to check the datasheet. Can that IOC bring the chip out of sleep?

    And, this may be as simple as connecting portc.0 to the ext int port with a 0R connection. Then, you set the ext int interrupt.

     
  • Megha Bhirade

    Megha Bhirade - 2020-11-24

    help me to fix this....
    i need to use IOC interrupt only for my application...
    using that pin Port i can achieve my application I am not getting....
    board is customized i can't get other pins also

     
  • Anobium

    Anobium - 2020-11-24

    Dont put the chip to sleep. Turn off all the modules to get to the lowest power consumption.

    Use DOZE mode?

     
  • Anobium

    Anobium - 2020-11-24

    Dont put the chip to sleep.

    Turn off all the modules to get to the lowest power consumption.

     
  • Megha Bhirade

    Megha Bhirade - 2020-11-30

    Hi,
    i am writing on display using i2c interface...
    chip select pin , LCD reset pin settings i did...
    what should be the data/command pin... while writing command and while writing data...
    is there any necessary to set SCL and SDA pins high or low

     
    • Anobium

      Anobium - 2020-11-30

      Use the MCC to set the pins. And PPS to set the pins. The MCC init will set the direction for you.

      I would recommend that you verify the bus is working using a Serial terminal.

       
  • Megha Bhirade

    Megha Bhirade - 2020-11-30

    MCC i used and added MSSP module...
    after adding module it took RC 3 as SCl and RC4 as SDA... both input/output mode...

    i have customized board...is there any other way to check without uart?

     
    • Anobium

      Anobium - 2020-11-30

      Yes . Use a protocol analyser.

       
  • Megha Bhirade

    Megha Bhirade - 2020-11-30

    can you please explain me what is protocol analyer and how to use it

     
    • Anobium

      Anobium - 2020-11-30

      I now recommend the usart method.

      Take the Great Cow BASIC for i2C discovery, compiler and it will work.

       
  • Megha Bhirade

    Megha Bhirade - 2020-11-30

    hi..
    i need some basic information about slave address..
    i am configuring i2c master and passing slave address 0x78..
    is it 7 bit slave address?
    i have some waveform captured on DSO....i will attach that and tell me what is happening...
    i am sending 0x78 and after that 0x00 and cmd..

     
  • Megha Bhirade

    Megha Bhirade - 2020-11-30

    yellow waveform is SDA and Blue is Clk waveform

     
  • Anobium

    Anobium - 2020-11-30

    Nice wave forms but with I2C the decoding in the key. The slave, if responding will clock the data out on the SDA as the master clocks the CLK. So, a wave form does not decode.

    Within the Great Cow BASIC distribution there is a program called "D:\GCB@SynRC31\GreatCowBasic\Demos\vendor_boards\great_cow_basic_demo_board\16f18877_chiprange_demonstrations\17_show_i2c2_devices_to_serial_terminal.gcb" - it will show the I2C bus on a serial terminal.

     
  • Megha Bhirade

    Megha Bhirade - 2020-12-13

    Hi,
    i am facing one more problem... MCU getting resetting after some time automatically..
    i am not getting reason why it is resetting..

    please help me to find out the reason and how to resolve it..

     
    • Anobium

      Anobium - 2020-12-13

      What is the first rule of electronics? Check the voltage.

      So, check the supply voltage, check the circuit (got caps fitted), them and only then check the config of the project.

       
  • Megha Bhirade

    Megha Bhirade - 2020-12-15

    hi,
    i checked connection properly everything is proper..
    if I used one switch using ioc means it will not reset the MCU..
    i am using 2 more switches as normal GPIO input after pressing one button continue..
    the MCU getting reset... what may be the reason for that...

     
    • Anobium

      Anobium - 2020-12-15

      I asked you to check the voltages and I asked if caps are fitted. The answer is?

       
  • Megha Bhirade

    Megha Bhirade - 2020-12-15

    Hi..
    our hardware person is telling everything is proper..
    then only one switch configured as IOC will work..

    for remaining 2 switches mcu getting reset... why?

     
<< < 1 2 3 4 > >> (Page 3 of 4)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.