Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

where do i learn bout PIC ?

Status
Not open for further replies.
hmm.... i don really get it ... may i just briefly explain wat i have done and please tell me if there's anything wrong.

i have made a reset circuit( which includes an LED), then next to it i connect the PIC, which i have programmed something called bootloader into it ... from wat i understand, bootloader is loaded to allow me to upload my programs thru a serial port. well... from readings i have done , i presume that programmer means a device to upload programs into the PIC without it being on the circuit board. i used a device called "pic start+" to upload bootloader into the PIC... but according to the guide my lecturer gave, after i've uploaded the bootloader into the PIC and connect it to the reset circuit.. when i power up the circuit .. the LED should be blinking ... does the bootloader make the LED blinks or do i have to upload another program for the LED to blink ?? thanx
 
if wat i mentioned above is correct ,.. then i think there are 2 types of programmer that i'm using now .... one will be uploading programs directly to the PIC using PICstart+ which i only can do in the lab... the other one will be by using a serrial port RS 232 with MAX232 converter where i can do my programming at home ...
 
kupikupi said:
hmm.... i don really get it ... may i just briefly explain wat i have done and please tell me if there's anything wrong.

i have made a reset circuit( which includes an LED), then next to it i connect the PIC, which i have programmed something called bootloader into it ... from wat i understand, bootloader is loaded to allow me to upload my programs thru a serial port. well... from readings i have done , i presume that programmer means a device to upload programs into the PIC without it being on the circuit board. i used a device called "pic start+" to upload bootloader into the PIC... but according to the guide my lecturer gave, after i've uploaded the bootloader into the PIC and connect it to the reset circuit.. when i power up the circuit .. the LED should be blinking ... does the bootloader make the LED blinks or do i have to upload another program for the LED to blink ?? thanx

kupikupi! :D

You should have mentioned all of this in your first post!...

The PICStart Plus is a programmer. You used it to program the bootloader in the PIC. You now need to get the actual LED blinking program onto the chip.

How you do this depends on your bootloader. You should really only follow what is in that guide the lecturer gave you.

Is there a particular software mentioned in that guide? You will need some software that will communicate with the bootloader...

P.S. You could use the PICStart Plus to program the LED blinking program directly, without the bootloader. But it looks like the lecturer wants you to first learn how to use the bootloader and the serial port to download programs/firmwares to the PIC. This is probably how you will get your code on the chip at home. If what I said in this paragraph confuses you, simply ignore it. You don't need to do anything I've said here. Not right now at least.
 
i understood wat u mean ..that was wat i assummed .. wat does the bootloader does actually??this is wat i think .. the bootloader is uploaded to allows us to upload programs to the PIC thru a serial port..


so u mean that the bootloader doesnt make the LED flash rite??
k ... this confuses me ... i dont know which is right ... my classmates tell me that the bootloader makes the LED flash(FYI, we all just started learning bout PIC) ... but i think i need to upload a program to make it flash ??

the guide the lecturer gave was that much ... he didn't mention about uploading our own program for the LED to flash ... so my classmates assume that the bootloader causes it to flash ... hmm... bout the software used to communicate with the bootloader... is it MPlab?? or something called hyper terminal ..


so now i have the PIC uploaded with the bootloader.. is it in anyway possible to make the LED blink without a LED blinking program ?? so to make the LED blink i can upload a blinking program thru the device called pic start plus or using the software connected to the PIc thru a serial port??
 
Bootloader is used only for uploading new code to PIC, it does not flash LEDs or otherwise alters PICs HW. I have good experiences with Tiny PIC bootloader , What you do is:
1. Flash the PIC with bootloader HEX (using standart Programmer)
2. connect the PIC to Serial port
3. Start Tiny PC application, load new HEX file and pres Flash
4. Reset PIC
5. Tiny starts to Flash the PIC, you end up with PIC with new HEX

Flashing LEDs is very easy. I am sure that Nigels tuttorials have a nice examples for you!
 
Jay.slovak said:
Bootloader is used only for uploading new code to PIC, it does not flash LEDs or otherwise alters PICs HW. I have good experiences with Tiny PIC bootloader , What you do is:
1. Flash the PIC with bootloader HEX (using standart Programmer)
2. connect the PIC to Serial port
3. Start Tiny PC application, load new HEX file and pres Flash
4. Reset PIC
5. Tiny starts to Flash the PIC, you end up with PIC with new HEX

Flashing LEDs is very easy. I am sure that Nigels tuttorials have a nice examples for you!

hi Jay ..

im not really sure wat u meant...
is Tiny the name of the software ??wat do u mean by flash ?? from the 5 steps u mentioned.. is it same as wat i did ??
i've uploaded the bootloader into the PIC.. but i was thinking of blinking the LED without connecting to the pc( i need to upload a program to blink the LED rite??) .. is it possible??
 
Yes Tiny is the name of SW, use the link I posted. The word "Flash" means "Start programming" or "Burn the HEX into PIC". If you just want to Blink LEDs, you don't need bootloader. Just make a simple program in MPLAB (write it in assembly), Build your project and Program it into PIC. If the program is OK, it will do what it is supposed to do (eg Flash LEDs).
 
thanks so much guys for patienly helping me out learning PIC .. i think i'm on the right track now...

So this is wat i do ... correct me if i am wrong....

to get the LED blinking .. i need to upload a program( which i can find in Nigel's tutes) to the PIC thru " PIC START PLUS " a programmer which i'm using in the Lab, then it will blink ??


My circuit board has 3 parts.. 1st is the reset circuit, FYI, i power it up with a 9V battery and which is regulated to 5 V .. the reset circuit is connected to the PIC ... and then the serial port RS 232 with MAX232 level converter..
 
Yes, that should work, but I am not sure if Nigels 16F programs will work on 18F452. I will write you that Flashing program if you want...
 
Jay.slovak said:
Yes, that should work, but I am not sure if Nigels 16F programs will work on 18F452. I will write you that Flashing program if you want...

u'll do it ?? thanx alot .. really appreciate that....
 
I am done, try this program, it should work with 18F452 @ 20Mhz all PINs will turn to 1 and after 1second back to 0.
 

Attachments

  • 18f452.hex.txt
    813 bytes · Views: 199
Jay.slovak said:
I am done, try this program, it should work with 18F452 @ 20Mhz all PINs will turn to 1 and after 1second back to 0.

thanx a lot... u really helped me alot... btw ..how did u do the hex program ??
how did u do it so fast??
 
I wrote that in MPLAB, I used my previous code and I just deleted 90% code from it :lol: . I hope that helps...
 

Attachments

  • 18f452.asm.txt
    2.1 KB · Views: 220
Jay.slovak said:
I wrote that in MPLAB, I used my previous code and I just deleted 90% code from it :lol: . I hope that helps...

i'll try it tmr... will tell u if works.... u've been really helpful ... thanx again ...
 
can i confirm once again ...

from the diagrams i've posted.. i got 2 ways to upload programs into the PIC.. 1st is the "pic start plus" programmer which i can only use in the lab ... then i also can use the serial port RS232 with MAX 232 level converter which interfaces with the pc , to upload programs and this i can do it at home since i have a PC..

thanx
 
kupikupi said:
can i confirm once again ...

from the diagrams i've posted.. i got 2 ways to upload programs into the PIC.. 1st is the "pic start plus" programmer which i can only use in the lab ... then i also can use the serial port RS232 with MAX 232 level converter which interfaces with the pc , to upload programs and this i can do it at home since i have a PC..

thanx
Yes!
Keep in mind bootloader has limitations (it reserves a part of PICs ROM and has to be started prior your code - after Reset).
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top