PDA

View Full Version : getting started with a PIC 18F4550



bigbear
- 15th October 2006, 23:02
I am new to pic programming and am trying to get my PIC 18F4550 to do something. I have wired it up, and written a small program to make it flash LED's on/off but it doesn't seem to work. I am not sure if I am using the correct pins as outputs, but I have probed each pin and they are either on or off, but none are flashing.

I am using MikroBasic and here is my code.

program Led_blinking

main:
TRISB = 0 ' Configure pins of PORTB as output
PORTB = %11111111 ' Turn ON diodes on PORTB
while true
PORTB = not PORTB ' Toggle diodes on portb
delay_ms(1000)
wend
end.

anyone have any good info for getting started with an 18F4550? Wire diagrams, sample .hex etc.

I am using a melabs USB programmer.

mw

BobK
- 15th October 2006, 23:32
Hi Bigbear,

Try the Mikrobasic forum at www.mikroelektronika.co.yu. There are several versions of Basic and MikroBasic is slightly different than PICBasic. They have a good forum also that can help you out.

BobK

bigbear
- 16th October 2006, 02:31
ok, thanks I'll check it out.

bb