Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Try taking the initialization code out of the while(1) loop. In your code, initialization is done again and again. I'm not sure but I think the postscaler of the timer 2 is reset with each initialization, which prevents the inturrupt.
I don't know how to determine the size of the program in words, given the size of the .hex file, but normally you don't need to know that.
If you are the programmer, the compiler (or assembler) tells you if your program fits the memory or not. If you have got only the .hex file, then it should...
Return address is the current PC when the interrupt comes. The value of the PCLATH doesn't matter. But, you need to save the original PCLATH value at the beginning of the interrupt service routine (ISR), and modify it according to GOTO, CALL addresses used in the ISR. When you are done, restore...
Try to import .hex file directly to Proteus. When you assemble your code in MPLAB, it generates the .hex file. Also, try to follow the format (codding style) suggested in template files located at C:\Program Files\Microchip\MPASM Suite\Template\Code or wherever they are located. As far as I...
Re: will it work ??
You need a driver for a brushless DC motor. Some of them has got integrated driver, which needs an analog input for speed adjustment.
If you want to design your own BLDC motor driver (which is not an easy task), the speed control is done by using PWM. PWM is also used for...
I want to access a PIC controlled device from the LAN, and I'm planning to use ENC28J60. Microchip provides a TCP/IP stack but I don't want to use it because of 2 reasons:
1) The only PIC programming language I know is the assembly language and Microchip TCP/IP stack is written for C.
2) I...
Another important issue is the noise immunity of PLC's. You may design a uC project and run it without problems in your lab environment, but don't expect it to run correctly in an industrial plant.
2^16 = 65536, so 65535 is the maximum value that can be stored in 2 byte register. When loaded with 3035, 65535 - 3035 = 62500 timer ticks are required before overflow, which requires 8 * 62500 = 500000 clock cycles with 1:8 prescaler. It results 0.5 seconds, as clock cycles take 1 us with a 4...
I have experienced a similar problem with JDM and winpic800 when programming the 16 series PICs. But I have no problems with icprog. Try it instead of winpic800.
Strangely, winpic800 and JDM worked well with a 18F2550. I am confused...
You can use a 555 timer in astable mode. You can find a schematic and calculator **broken link removed**. Variable period and duty cycle can be achieved by using variable resistors and capacitors. You may also need to use the CONTROL pin.
Your delay code is still wrong. You are setting the loop counters at outside of the DELAY block, so these 6 lines are never executed.
For 1 second delay, the calculator gives this code:
DELAY
;999990 cycles
movlw 0x07
movwf d1
movlw 0x2F
movwf d2
movlw 0x03
movwf d3
DELAY_0
decfsz d1...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.