Re: medir duty y frecuencia
Well, I don't see a chip number in there anywhere and a schematic would be nice. Would be good also if you gave the part number of the display.
I've yet to see the oscillator set using define intosc 4 but I've been wrong recently.
Re: medir duty y frecuencia
1 Attachment(s)
Re: medir duty y frecuencia
subo simulacion en proteus y archivos
Re: medir duty y frecuencia
Well I don't have Proteus so I can't look at your simulation. However define lcd_lines 2 needs to be define LCD_LINES 2. Define can be anything but just like all your other lcd stuff the define itself has to be in upper case.
It looks like you need to do some setting of configs for the oscillator also.
Re: medir duty y frecuencia
Cambie el oscilador a 8mhz y puse en mayúsculas las definiciones lcd y sigue andando mal algún ejemplo para hacerlo con el timer1 voy usar pic16f883
Re: medir duty y frecuencia
So Google translate is failing me but if you're still using the code from post #1 and using a 16f883 you need to set the OSCCON and maybe the CONFIG1 register. Telling PBP3 to interpret the code at 8 MHZ is done by "define OSC 8" where you've got define intosc 4. The OSCCON register is where you set the chip to run at 8 MHz. If you've updated your code please use the code tags box and post your code.
Sometimes the issue is the LCD so giving the part number of it may help. There are quite a few examples in this forum using timer 1 but I'm not sure why, with above code, you need it. Although some will scream heresy I'd recommend slowing down the display of the values so you can see what's going on. PAUSE 100 may not allow you to see what's happening.
I also think your LCDOUT lines need work. I'm not sure where lines $8a or $c9 are located. At least they're not in the PBP chart. Maybe $80 and $C0 will work better.