kupikupi said: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 at assembly and I'm learning it now.. but i need to use it tomorrow. please help me .. thanx
The codes above simply initialise the USART, it doesn't actually 'do' anything - you also don't give any clue as to what you want to do?. 'Communicate with the PC' is so vague as to be meaningless?
kupikupi said:The codes above simply initialise the USART, it doesn't actually 'do' anything - you also don't give any clue as to what you want to do?. 'Communicate with the PC' is so vague as to be meaningless?
sorry bout that... well .. for my project, there are 2 ways of uploading programs into the PIC one of them will be using a programmer called " pic start plus" i can only use it in the Uni lab, so , there is another way to upload program which is thru a serial port RS 232 using MAX 232 converter, but i was told that i cant upload a program directly without USART .. but how do i use USART??
this was fromm jay ...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...
kupikupi said:another question...
lets say i have a LED blinking program in my PIC, i want to upload a motor driving program ...
when i upload it ... do i have to do anything so that i wont overwrite the previous program or i just upload it and the bootloader will arrange it for me ?
kupikupi said:so do u mean that the PIC can only take one program at once?
meaning that if i want the PIC to perform multi tasks , i have to combine all the programs into 1 ?? i cant separate the programs?? i'm really new with PIC, i dont know how it works.... :?
kupikupi said:i'm a little confused about the Tiny bootloader that Jay was talking about, is it a .hex file to program into the PIC or is it software like Mplab ?? from the previous post i understood that Tiny bootloader has the same function as Mplab(i used mplab to upload program into the PIC thru picstart plus,now i want to upload programs from home using serial port) so could i just use mplab instead of the the tiny bootloader ? is it the same ?? and i still need to upload a bootload .hex file into the pic thru picstart plus b4 i can do so right??
i went thru the tiny bootloader site and i cant find any bootloader .hex file. could anyine help me out here??how do u rite a bootloader hex file?
kupikupi said:so is it that i can only use mplab to upload program to the PIC thru microchip programmers..
kupikupi said:.. and for uploading via serial port ..
kupikupi said:i will need bootloader together with the bootloader software?? the one shown below?? are all bootloaders the same ?? meaning that i can just download any bootloaders and run with this software, Tiny bootloader??
The receiver is placed such that the IR beam from the transmitter can be seen.kupikupi said:do u know how the IR module works with the PIC?? where is the receiver placed and where is the transmitter placed ??
IR transmitter is just a diode like LED. It sends out IR instead of visible light. You can "see" the beam if you view it using a camera phone.kupikupi said:wat components does the IR consist of and do i get it part by part or it's sold as 1 set??
You'll need an interface between joystick and IR transmitter. You either build one or buy a cheap universal remote, use the internal components and wire the joystick switches to replace the original keys. You connect the receiver to one port pin of the PIC and using software to decode what command is being sent from the transmitter.kupikupi said:if i use a joystick to control the direction of the motor .. how does a joystick send signal to the PIC?? and is the transmitter connected to the joystick ???
You'll need an interface between joystick and IR transmitter. You either build one or buy a cheap universal remote, use the internal components and wire the joystick switches to replace the original keys. You connect the receiver to one port pin of the PIC and using software to decode what command is being sent from the transmitter.
Did you program that PIC with bootloader HEX before with normal programmer? It won't work without it.kupikupi said:Jay .... i tried to use the Tiny bootloader ... but it can't seem to work it shows this
Jay.slovak said:Did you program that PIC with bootloader HEX before with normal programmer? It won't work without it.
LIST P=18F4320 ; change also: Configure->SelectDevice from Mplab
xtal EQU 20000000 ; you may want to change: _XT_OSC_1H _HS_OSC_1H _HSPLL_OSC_1H
baud EQU 115200 ; standard TinyBld baud rates: 115200 or 19200
LIST P=18F452 ; change also: Configure->SelectDevice from Mplab
xtal EQU 20000000 ; you may want to change: _XT_OSC_1H _HS_OSC_1H _HSPLL_OSC_1H
baud EQU 19200 ; standard TinyBld baud rates: 115200 or 19200
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?