Hi All
Been trying to teach myself on how to program pics, I built mysef a serial "JDM" programmer and used PICPgm software to program the pic, code was compiled on Proton IDE Lite (PICBasic) as I found it easy.
I wrote a really basic program just to test, just making 2 LEDs flash.....but it doesn't seem to work, what I do know is, Proton only has the 16F628A listed on the program and I'm using a 16F826, not the "A".
When I program it with PICPgm, it does "verifies" and say completed and doesn't show any errors.
But when running it on my test board it doesn't work..... just have 2x 3mm LED in series from RB0 and RB1...
Quote
Device = 16F628A 'This tells the compiler what microcontroller we are using.
XTAL = 4 'This tells the compiler how fast the chip will be running, which in this case is 4MHz.
Symbol LED0 = PORTB.0 'This is an "alias", a way of naming things to make them more convenient to work with. Here we are setting
Symbol LED1 = PORTB.1 ' up PORTB.0 to have the name "LED"; now when we use the name "LED" in the program the compiler will know
' we mean PORTB.0. It is just an easier way of remembering things, as you'll see later.
TRISB = %00000000 ' Sets pins/port to outputs
Flasher:
High LED0 'flash LED0
DelayMS 200
Low LED0
DelayMS 350
High LED0 'flash LED0
DelayMS 200
Low LED0
DelayMS 350
High LED0 'flash LED0
DelayMS 200
Low LED0
DelayMS 350
High LED0 'flash LED0
DelayMS 200
Low LED0
DelayMS 350
High LED1 'flash LED1
DelayMS 200
Low LED1
DelayMS 350
High LED1 'flash LED1
DelayMS 200
Low LED1
DelayMS 350
High LED1 'flash LED1
DelayMS 200
Low LED1
DelayMS 350
High LED1 'flash LED1
DelayMS 200
Low LED1
DelayMS 350
GoTo Flasher
****** sorry, don't know how to post the "code" in this text box
Been trying to teach myself on how to program pics, I built mysef a serial "JDM" programmer and used PICPgm software to program the pic, code was compiled on Proton IDE Lite (PICBasic) as I found it easy.
I wrote a really basic program just to test, just making 2 LEDs flash.....but it doesn't seem to work, what I do know is, Proton only has the 16F628A listed on the program and I'm using a 16F826, not the "A".
When I program it with PICPgm, it does "verifies" and say completed and doesn't show any errors.
But when running it on my test board it doesn't work..... just have 2x 3mm LED in series from RB0 and RB1...
Quote
Device = 16F628A 'This tells the compiler what microcontroller we are using.
XTAL = 4 'This tells the compiler how fast the chip will be running, which in this case is 4MHz.
Symbol LED0 = PORTB.0 'This is an "alias", a way of naming things to make them more convenient to work with. Here we are setting
Symbol LED1 = PORTB.1 ' up PORTB.0 to have the name "LED"; now when we use the name "LED" in the program the compiler will know
' we mean PORTB.0. It is just an easier way of remembering things, as you'll see later.
TRISB = %00000000 ' Sets pins/port to outputs
Flasher:
High LED0 'flash LED0
DelayMS 200
Low LED0
DelayMS 350
High LED0 'flash LED0
DelayMS 200
Low LED0
DelayMS 350
High LED0 'flash LED0
DelayMS 200
Low LED0
DelayMS 350
High LED0 'flash LED0
DelayMS 200
Low LED0
DelayMS 350
High LED1 'flash LED1
DelayMS 200
Low LED1
DelayMS 350
High LED1 'flash LED1
DelayMS 200
Low LED1
DelayMS 350
High LED1 'flash LED1
DelayMS 200
Low LED1
DelayMS 350
High LED1 'flash LED1
DelayMS 200
Low LED1
DelayMS 350
GoTo Flasher
****** sorry, don't know how to post the "code" in this text box