I"m trying to use RS-232 on the PIC18F4550. I wrote out the code already, but I'm getting errors saying that the following variables are not defined. I thought these were standard variables that shouldn't need to be defined. Do you know what the issue is?
I'm also getting errors with these variables, but I also get errors when I define them.
Warning[207] C:\SERIAL_1.ASM 137 : Found label after column 1. (xtal_freq)
Warning[207] C:\SERIAL_1.ASM 138 : Found label after column 1. (baudrate)
Warning[207] C:\SERIAL_1.ASM 139 : Found label after column 1. (spbrg_value)
That file is included. Does this mean my file is corrupt or something? Where can I download another copy to test this?
I just looked in the P18F4550.inc file. It doesn't contain OPTION_REG. Is this normal? I have two copies of the file on my computer and neither one includes it.
The p18f4550 does not have an option register.
This register is usually used on the mid range devices to set up the Timer_0/WDT prescaler and the interrupt enables for the int pin, timer0, port b change and their interrupt flags.
On the pic18, these have their own registers.
Also, never ignore compiler warnings unless you understand what they are saying and it will not affect your code!
Those warnings sound like your variables are being interpreted as labels?
Thank you for the tip on the software. Unfortunately, it only provides code in C. I'm working in Assembly. I've decided to switch to a PIC16 which I am a little more familiar with. I've created another post called rs232 to deal with issues I'm having there. Thank you everyone for your help!
Go to the Microchip website and download the manual for your device. On inspection you will find that this device does not have an OPTION_REG which is why you compiler does not recognise it. The manual will indicate what bits you will need to set and in what register you will find them for your device. Good luck!