Pumpkin, Inc.

Pumpkin User Forums

LEDs wont light

For issues specific to Microchip's PICmicro® MCUs, including compilers (e.g. HI-TECH PICC & PICC-18, Microchip MPLAB®-C18) and IDEs (e.g. Microchip MPLAB®).

LEDs wont light

Postby ryanjpcush » Wed Jul 14, 2004 4:26 am

Hi I am an Msc student and I have started using Salvo Lite (before I buy main version)for my dissertation. I have gone through all the tutorials which come with it and understand them fully.

My problem is that whenever I try to use the code that is used for tutorial 3 to light some leds (I'm using a FLASH-LAB 77 board) they wont light. In debug mode on MPLAB v6.4 the Port pins are being set correctly but when I download the code to the PIC18f452 using ICD2 the leds wont come on - is there something simple I'm not doing??

Thanks in advance ryanjpcush@hotmail.com

Here is the code:

Copyright (C) 1995-2002 Pumpkin, Inc. and its
Licensor(s). Freely distributable.

$Source: C:\RCS\d\salvo\tut\tu3\main.c,v $
$Author: aek $
$Revision: 3.7 $
$Date: 2003-06-13 17:05:13-07 $

Source for tutorial programs.


#include "main.h"
#include "salvo.h"


unsigned int counter;

void TaskCount( void )
for (;;) {



void TaskShow( void )
for (; ;) {



void main( void )




OSCreateTask(TaskCount, OSTCBP(1), 5);
OSCreateTask(TaskShow, OSTCBP(2), 5);

for (;;)

[This message has been edited by aek (edited July 14, 2004).]

Posts: 3
Joined: Mon Jun 14, 2004 11:00 pm
Location: Ireland

Re: LEDs wont light

Postby aek » Wed Jul 14, 2004 7:52 am

I believe another user (CharChar) had the same problem -- most likely, thhere's an additional peripheral initialization that you need to do for your particular chip to get it working.

For example, some PICs default to analog inputs on certain ports -- therefore you'd need to change them to digital I/O in your init before you can drive LEDs from those ports.

So, carefully review your PIC's datasheet for everything associated with your I/O ports.


Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Return to PICmicro MCUs

Who is online

Users browsing this forum: No registered users and 2 guests