LEDs on EasyPIC5 HW REV 1.02

General discussion on mikroBasic PRO for PIC.
Post Reply
Author
Message
mes mariusz
Posts: 8
Joined: 24 Jan 2011 12:19

LEDs on EasyPIC5 HW REV 1.02

#1 Post by mes mariusz » 24 Jan 2011 12:47

Hello.

I have strange problem with LEDs on PCB EasyPIC5 HW REV 1.02.

I pogrammed the PIC16F877A using code:

Code: Select all

program display1

dim i as byte

sub function mask(dim num as byte) as byte    ' this function returns mask
                                              ' of parameter 'num'
  select case num                             ' for common cathode 7-seg. display
    case 0  result = $3F
    case 1  result = $06
    case 2  result = $5B
    case 3  result = $4F
    case 4  result = $66
    case 5  result = $6D
    case 6  result = $7D
    case 7  result = $07
    case 8  result = $7F
    case 9  result = $6F
  end select'case end
end sub

main:
  INTCON = 0                    ' Disable PEIE,INTE,RBIE,T0IE
  TRISA  = 0
  TRISB  = 0
  TRISC  = 0
  TRISD  = 0
  TRISE  = 0

'  PORTD  = 0
'  PORTA  = 4

  while TRUE
    for i = 0 to 9
      PORTA = mask(i)
      PORTB = mask(i)
      PORTC = mask(i)
      PORTD = mask(i)
'      PORTE = mask(i)
      Delay_ms(500)
    next i
  wend  'endless loop

end.
And what I see? There is no the same combination in RA...RD LEDs.

All dip swithes are turned off and notheing is connected to the ports (DIS0...3, SW1...SW5, SW7...SW9 ae in off position)

Then I compiled code:

Code: Select all

program display1

main:
  INTCON = 0                    ' Disable PEIE,INTE,RBIE,T0IE
  TRISA  = 0
  TRISB  = 0
  TRISC  = 0
  TRISD  = 0
  TRISE  = 0

'  PORTD  = 0
'  PORTA  = 4

PORTA = 255
PORTB = 255
PORTC = 255
PORTD = 255


end.
and the LEDs:

RA4, RA6, RA7, RC3, RC4, RC5 are always turned off.

What can be a reason of that?

hexreader
Posts: 1786
Joined: 27 Jun 2010 12:07
Location: England

Re: LEDs on EasyPIC5 HW REV 1.02

#2 Post by hexreader » 25 Jan 2011 20:49

RA4 is an open collector output, so will not light an on-board LED

RA6 and RA7 are connected to your crystal, not to LEDs

RC3, RC4, RC5 are connected through J12 on EasyPIC5. Is J12 set correctly?
Start every day with a smile...... (get it over with) :)

mes mariusz
Posts: 8
Joined: 24 Jan 2011 12:19

Re: LEDs on EasyPIC5 HW REV 1.02

#3 Post by mes mariusz » 26 Jan 2011 08:02

hexreader wrote:RC3, RC4, RC5 are connected through J12 on EasyPIC5. Is J12 set correctly?
I see J12 is used for USB COMM, but I removed jumpers and problem still exist.

Signals measured using scope directly on uC RC3, RC4, RC5 shows 5V but LED's RC3, RC4 and RC5 are not active. If I click switches RC3, RC4, C5 leds blinks OK. So probably signals between uC and these three leds are lost. But why and how to find it? There are avalible somewhere a PCB diagrams for EasyPIC5 REV. 1.02 ?

mes mariusz
Posts: 8
Joined: 24 Jan 2011 12:19

Re: LEDs on EasyPIC5 HW REV 1.02

#4 Post by mes mariusz » 26 Jan 2011 08:21

Ok. I'ts resolved now. Jumpers on J12 must be set to left side.

cymb
Posts: 464
Joined: 30 Nov 2008 01:19
Location: indiana usa

Re: LEDs on EasyPIC5 HW REV 1.02

#5 Post by cymb » 26 Jan 2011 17:46

progress!!
not an appliance operator

Post Reply

Return to “mikroBasic PRO for PIC General”