where do i learn bout PIC ?

Status
Not open for further replies.
kupikupi said:
--- when does the bootloader comes into the picture?? is it when i want the PIC to communicate with the PC??

Bootloader is just the middle man, like a postman delivering a letter from one location to another, except that he lives in your garden/or one room of your house when he has nothing to do.

It gets the program HEX file from user's computer via serial communication and program it into the PIC remaining program memory(the bootloader uses part of the PIC program memory).

Bootloader requires a specific software running on the PC or MAC to work. This software running on the computer knows how to "talk" to the bootloader inside the PIC.

When you have sent your HEX file, and the bootloader written your codes to the remaining program memory, the bootloader's work is done and it just let your program takes over.

If your PIC program has codes to use the USART, then you can communicate with the PC using serial port. Don't expect the bootloader to offer you any "additional power" that your code does not have.
 
eblc1388 said:
Bootloader is just the middle man, like a postman delivering a letter from one location to another, except that he lives in your garden/or one room of your house when he has nothing to do.

:lol: Good one :lol:
 

wow!! this is super clear ... thanx
 


sorry i have to repost this in case someone missed it ...
btw .. my bootloader question has been answered by eblc1388 .. thanx
 
kupikupi said:
is it neccessary to have the bootloader in the PIC??
No, bootloader is handy when you don't have an access to real programmer or you want to upgrade your SW "in the field" (if you are a manufacturer and allow customers to upgrade their products with just connecting them to PC).
 
USART is a hardware peripheral, which will take care of the transmission itself, so that your code can do somethnig else while you are sending/receiving.
Bootloader is a software routine that takes Bytes from USART and place them into Program memory...
 

so i need a code so that the USART will work rite??
would it be this??

movlw D’25’
movwf SPBRG ;initialize SPBRG
movlw H’24’
movwf TXSTA ;initialize TXSTA
movlw H’90’
movwf RCSTA ;initialize RCSTA

i got it from somewhere and i dontknwo wat it does
 
so .. do i have to upload this program to the PIC thru a programmer(pic start plus) b4 i can use the serial port??
 
kupikupi said:
so .. do i have to upload this program to the PIC thru a programmer(pic start plus) b4 i can use the serial port??
Yes exactly, BUT you don't have to write your own bootloader, there are a plenty of pre-made ones! Just go to Tiny Bootloader site and download it there (I contributed with code for 18F4320 ).
 
kupikupi said:
in PIC start plus.. i used MPLAB as the software to upload program into the PIC
--- wat do i use if i use serial port?? i've heard of "hyper terminal" .. but i dont know the use of it ...

could anyone give me some help on this??
 
I have told you that! Tiny PIC Bootloader (it's a PC software and PICs bootloader), programming is done through Serial port.
 
Jay ... the LED blinking program u wrote ....

Code:
ZDRZ0	equ	D'000'
	ZDRZ1	equ	D'001'
	ZDRZ2	equ	D'002
'

wat does this mean ?? i cant find it in Nigel's tute nor the datasheet... is there anywhere i cant learn mainly bout assembly language
 
That's an example of "equ" Assmebler directive, it tells the Compiler, to substitute ZDRZ0 with D'000' everytime it finds it in source code (when you hit the Build button).
It's more practical to write MOVF ZDRZ0,w than MOVF D'0',w so it is more Human like :lol:

BTW: I am refering to Data memory - RAM registers.
 

wats D'000 actually??

another thing .. in Nigel's tute .. there was something called CMCON... but that for the 16F series... if i wanted to modify it for 18F series... wat do i do?
when u changed it .. how did u know wat 16F doesnt have that 18F has??
 
D'000' is the same as 0 (just looks better), and it's the address of first memory place in RAM (for 18F), treat it as a Variable to store data.

As for CMCON, one word Datasheet!
Everything you need is in there, just read it carefully!
 
movlw D’25’
movwf SPBRG ;initialize SPBRG
movlw H’24’
movwf TXSTA ;initialize TXSTA
movlw H’90’
movwf RCSTA ;initialize RCSTA

i want to upload the USART codes into my PIC so that the PIC can communicate with the PC ... do i use the codes above??
could anyone help me to modify it so that i can upload it directly to the PIC??
im really terrible at assembly and I'm learning it now.. but i need to use it tomorrow. please help me .. thanx
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…