Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




Seemingly unstable basic PIC18F2550 circuit

UserPost

11:52
16 Februari 2017


kyson

Calon Rakyat

posts 1

1

From my work I've had quite a bit of experience with hardware development, but purely from a supervisory role, and so recently I've been playing around with ground up MCU circuit design to try to get a better understanding.

I put the following circuit together to allow me to play around with the MCU registers a bit and it does work - only intermittently.

The LED blinks as intended, then stops for an arbitrary time, flashes again a different number of times, off again etc. There doesn't seem to be any cyclic behaviour to it. It starts working without any external input (i.e. nudging it) so doesn't seem like a loose connection either. I realise the second Vss pin isn't grounded in the schematic, but this didn't help the circuit either when I tried it. Could it be because Vusb isn't grounded? I would have thought this would only affect USB operation.

Code:
#include <stdio.h>
#include <stdlib.h>

#include <p18f2550.h>
#include <delays.h>

#pragma config FOSC = INTOSCIO_EC      

#pragma config WDT = OFF              

void main() {

    TRISAbits.TRISA1    = 0;    // Set RA1 as output
    LATAbits.LATA1      = 1;    // Set RA1 as HIGH

    while (1)
    {
        LATAbits.LATA1 = ~LATAbits.LATA1;   // Toggle LED pin
        Delay10KTCYx(25);                   // Delay
    }
}
Datasheet of the PIC18F2550: http://www.kynix.com/uploadfil.....668338.pdf
Search 

About the Komunitas Mikrokontroler Indonesia forum

Most Users Ever Online:

21


Currently Online:

1 Guest

Forum Stats:

Groups: 4

Forums: 13

Topics: 71

Posts: 107

Membership:

There are 811 Members

There has been 1 Guest

There are 2 Admins

There are 0 Moderators

Top Posters:

rosesana - 14

ruslan - 8

fandi - 7

dizlian - 5

windaryanto - 4

compfest2011 - 3

Administrators: juragan-forum (0 Posts), Penguasa Komunitas Mikrokontroler Indonesia (0 Posts)





Cetak Laman Ini Cetak Laman Ini

This site is a member of WebRing.
To browse visit Here.