Sound frequency/pitch problem PIC16F877

Thread Starter

DonutChan

Joined Mar 3, 2019
33
I successfully made a Piano circuit work on PIC16F84A using assembly language. When I wanted to move it over to PIC16F877 (changing the configration of course) , when clicking on the keyboard, the buzzer made some really high pitched sounds come out, not the normal do-re-mi-fa sounds. I wonder why that is?
 

jpanhalt

Joined Jan 18, 2008
8,059
I successfully made a Piano circuit work on PIC16F84A using assembly language. When I wanted to move it over to PIC16F877 (changing the configration of course) , when clicking on the keyboard, the buzzer made some really high pitched sounds come out, not the normal do-re-mi-fa sounds. I wonder why that is?
Please post the circuit and code. Are you operating at the same MCU frequency?
 

jpanhalt

Joined Jan 18, 2008
8,059
I don't see a configuration statement. Do you just set it in the Assembler? It might be good to add the directive in code as a reminder, even if it is commented out.

Are you using the same crystal/resonator/oscillator that you used with the 16F84A. When I look at the schematic, you don't show any oscillator connected.

Nothing else in the code jumped out at me.
 

Thread Starter

DonutChan

Joined Mar 3, 2019
33
I don't see a configuration statement. Do you just set it in the Assembler? It might be good to add the directive in code as a reminder, even if it is commented out.

Are you using the same crystal/resonator/oscillator that you used with the 16F84A. When I look at the schematic, you don't show any oscillator connected.

Nothing else in the code jumped out at me.
Yes, i'm using the same crystal,, as for the directive in code, i might as well try adding the full configuration. Although i got away with it in the pic16f84A .. I appreciate your help- I will reply again once i get my hands on it.
 
Top