Hi ppl,
What are the stuffs at Address 0x8020 of pic18f4331. Apparently there are values in the new chips and whenever i erase the eeprom, blank check will fail at that address occassionally.
Tks ywz
Hi ppl,
What are the stuffs at Address 0x8020 of pic18f4331. Apparently there are values in the new chips and whenever i erase the eeprom, blank check will fail at that address occassionally.
Tks ywz
Why would you want to try and program that location? That particular PIC only has 8K bytes of program space and that address is well above that boundary, but still inside the code space area.
What kind of programmer are you using?
All your answers will be found here:
18C Reference Manual:18F4331 Datasheet:
Hi Anthony,
I am using a Pilot Programmer from Advin Systems. I am not trying to program at that location but I realised the observation when I am stuck with a problem with the chip. If you are free maybe can take a look at this thread:
Started to look for various possible areas when I came across the values at the address.
Thanks ywz
First comment. Have you got LVD programming disabled in your fuses?. Your behaviour with pin38, is 'classic' for this being left enabled. This pin _must_ be tied low, if this is not disabled, for the chip to run. This feature _must_ be disabled, unless you have the wiring attached to this pin to use this ability. Note 3, section 22.9 in the data sheet. Most normal programmers do _not_ use this mode. Second comment. You have only got two of the PWM pins enabled (PWM0, and PWM1 - look at what you are writing to PWMCON0). This is why the pins do not behave as if complementary output mode is enabled...
Best Wishes
Strange my post yesterday did not appear.
Anyway, Thanks again Roger. The LVP solves the problem. I am now getting all the six PWMs using the override bits. However the complementary part does not work when I try to simulate in MPLAB. Just curious why is that the case (PWMCON0 is set accordingly- 0100 0000).
Another question is the duty cycle I load in PDC registers. Seems that no matter what I write to the registers, the duty cycle is the same. Even when I comment out the loading of the PDCxL:PDCxH, waveforms of the same duty cycles appear.
Lastly, when I load deadtime in DTCON, no dead time appears. Must I initialize or load some other reg beside DTCON and PDC for the above two points?
While trying to figure these software issues, I fiddled with the hardware. Tied the PWMs to a driver (IR2130) and mosfets. The motor does not move. Guess I left out some stuffs in the circuit. I am looking at the datasheet of IR2130 and AN-985 apps notes. Any examples of such circuits? Btw, I am driving a BLDC motor.
Cheers ywz
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.