Author Topic: PIC18F46K42 xpress EVAL Board  (Read 2171 times)

0 Members and 1 Guest are viewing this topic.

Offline arulTopic starter

  • Regular Contributor
  • *
  • Posts: 50
  • Country: in
PIC18F46K42 xpress EVAL Board
« on: November 20, 2018, 12:12:04 pm »
Hi,

I recently bought a MPLAB Xpress evaluation kit for PIC18F46K42. Now i know i can just drag and drop the hex file in order to program it. I have doubt. After programming, the program LED(Red) is glow continuously or else just blink that programming moment only?

Now i am wrote LED toggle program on mplab cloud ide and am setup the oscillator system and output configuration settings using MCC. Now that corresponding LED was continuously glow not yet toggle. In that same program am wrote on mplab x ide also, but that same thing only i got.


#define IO_RA0_Toggle()             do { LATAbits.LATA0 = ~LATAbits.LATA0; } while(0)      /// pin_manager.h

///////main loop////////////
    while (1)
    {
       IO_RA0_Toggle();
        delay(50);
    }
////////////////////////////


Please let me know
 

Offline H.O

  • Frequent Contributor
  • **
  • Posts: 953
  • Country: se
Re: PIC18F46K42 xpress EVAL Board
« Reply #1 on: November 20, 2018, 12:34:44 pm »
Male sure the coresponding bit in the ANSEL register is cleared. It's not on POR.
 

Offline arulTopic starter

  • Regular Contributor
  • *
  • Posts: 50
  • Country: in
Re: PIC18F46K42 xpress EVAL Board
« Reply #2 on: November 20, 2018, 01:18:49 pm »
Hi #H.O,

I am sure, cleared the corresponding ANSEL bit in the pin module setup.
 

Offline JackJones

  • Regular Contributor
  • *
  • Posts: 229
  • Country: fi
Re: PIC18F46K42 xpress EVAL Board
« Reply #3 on: November 20, 2018, 02:03:13 pm »
        delay(50);

I think your delay just might be too fast, thus appearing to glow continuously. Try something a lot larger.
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3508
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: PIC18F46K42 xpress EVAL Board
« Reply #4 on: November 20, 2018, 04:23:07 pm »
        delay(50);

I think your delay just might be too fast, thus appearing to glow continuously. Try something a lot larger.
Or just hook a scope on it. Actually one of the test I would try is leave out the delay and hook that pin to a frequency counter.
 

Offline arulTopic starter

  • Regular Contributor
  • *
  • Posts: 50
  • Country: in
Re: PIC18F46K42 xpress EVAL Board
« Reply #5 on: November 21, 2018, 08:19:24 am »
Hi
 
Thank you all...

Now I am increasing more delay. I can seen the toggle.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->