Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

Reply To: Generating sound with PIC

Home Forums MikroC Pro for PIC Tutorial Discussions Generating sound with PIC Reply To: Generating sound with PIC

#3921

Bitahwa Bindu
Keymaster

The PIC you used in mikroC project is PIC16F887, not PIC18F2220.

You have a lot of mistakes in your project. It always good to try and understand the code instead of copy and paste.

  • First, you used PIC18F2220 in Proteus schematic but used PIC16F887 in mikroC.
  • In mikroC you selected to use an external oscillator (HS) but in Proteus there is no oscillator. It won’t work.
  • You enabled the MCLR pin in mikroC project, but unconnected in Proteus, the Project will keep on resetting.
  •  Why do you need ANSELC = 0;  on PORTC while you are connecting nothing to it? Did you read the comments?
  • Not all PIC have ANSEL register to disable analog functions on PIC. For this PIC, you can use ADCON1 register. See page 212 of PIC18F2220 datasheet.

 

Select your currency
EUR Euro
USD United States (US) dollar