Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Problems with PIC16f676

Status
Not open for further replies.

ankitvirdi4

Member level 4
Member level 4
Joined
Mar 13, 2012
Messages
70
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,288
Location
India
Visit site
Activity points
1,928
Hello everybody, I am new to programming and PIC controllers, I just wrote down a code to blink led in MPLAB IDE v8.91 and compiled it using HI-TECH C.the code is
#include <htc.h>
#include "delay.h"
void main()
{
TRISC=0x00;
while(1)
{
PORTC=0x00;
DelayMs(500);
PORTC=0xff;
DelayMs(500);
}
}

it Compiles ok and the project builds successfully but it doesn't simulate in proteus. I have attached the workspace and simulation file please tell me where am i wrong.
 

Attachments

  • blink.rar
    71.6 KB · Views: 70
Last edited:

I want to simulate it in proteus. If I use 18f452 then it is working fine. And thanks, I changed it to portc and tried.It builds fine but doesnt run in proteus.
 

Its okay Thanks.I got my error I have to keep MCLR pin high in proteus know it is working fine. I am doing a project in PIC 16f676 I am good at C bt very new to microcontrollers. I want to use ADC of of 16f676 are there any subroutines available? Or will I have to make one? How to use ADC if you can please explain I will be grateful.
 

Also is MICRO C for pic a better compiler or HI-tech C??

- - - Updated - - -

ANSEL=0 will configure portA as analog or I/O I understand the channels of ADC are on PortA
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top