View Full Version : Problems faced while using PIC18F4680

12-30-2005, 05:16 PM
Hi all,
while interfacing PIC18F4680 i faced number of problems.
i will like to tell everyone those problems pl do tell me if any one faced same problems and the solutions that you all have for the same.

1) if we want to use a external crystal oscillator then we have to configure it in HS mode in the configuration register while compilling (in the MPLAB).
otherwise your oscillator will not work as it is configured in RC oscillator mode by default.
2) if we by chance touch the oscillator pin then the oscillator automatically switches to internal oscillator and so we have to bring it in the external mode by setting PIR2 register. the internal freq is very low i.e. 32khz . We can use internal ocillator though permenantly by setting OSCON AND OSTUNE REGISTERS to get internal freq of 8MHZ max "without any external crystal".
but here the problem is that we cannot use the PLL mode for it .
it is mentioned in documentaion that internal osc * PLL will give 32mhz max but it dose not work and we get max freq of 8mhz only.
3)if you want to use portB as an output then make "low voltage osc" as disabled in the configuration setting of MPLAB as disabled, if this is not done then if you connect pin 38 of PIC18F4680 to 5v through pullup then the entire portB will get disabled. :lol:
4)one thing i find to laugh at is oscillator pins are multiplexed ,not only that the power up reset pin is also multiplexed :lol: :lol: :lol:
5)SPI module can transmitt data properly but always generate a bit error while receiving,but this error i have removed by software manipulation.
6)in documentaion related to SPI they have told to SET bits in TRISF register. but the register is not present in the chip :lol:
7)which ever pins are not used connect them to ground . if this is not done touching these pins will take the pic to internal oscillator mode.
8)whenever you face some problems related to ports just see if any bit has to be enabled or disabled in the coniguraton registers placed at 300001 onwards.
8)many problems are present in documentaion.
9)if you want to write a sheduler for PIC then it is mentioned to save values of 3 registers manualy as MPLAB dose not do this (as a part of context switching) , but in addition to this INTCON must also be saved or else your scheduler will never work .................................................. ........................................
i will add all the other problems related to pic as i rember.........
dont know if i am right but my opinion about PIC is not atall good, i had heard from one of my friend that in order to capture market they have added all the things in one chip but the design is not atall stable,he had faced same problems in I2C interface using PIC

thanking you

12-30-2005, 11:17 PM
Hey sorry man I was posting a new topic and by mistake clicked on post reply.