D
Davide Laneri
- Jan 1, 1970
- 0
Hello everybody,
I am new to this newsgroup and also new to microcontroller programming
and electronics.
I need to generate a tone with a PIC. It is attached to a codec that can
play the sound.
Ideally I would like to have a function that would get a frequency as
input and that would generate a simple tone of that frequency.
I know I have to generate a sin wave of a certain amplitude and
frequency but I don't know how to do that in C for PIC and also what to
send to the codec (I guess I have to sample the wave and send a certain
amount of values of it).
Any suggestion or advice would be greatly appreciated.
Thanks a lot.
Davide
I am new to this newsgroup and also new to microcontroller programming
and electronics.
I need to generate a tone with a PIC. It is attached to a codec that can
play the sound.
Ideally I would like to have a function that would get a frequency as
input and that would generate a simple tone of that frequency.
I know I have to generate a sin wave of a certain amplitude and
frequency but I don't know how to do that in C for PIC and also what to
send to the codec (I guess I have to sample the wave and send a certain
amount of values of it).
Any suggestion or advice would be greatly appreciated.
Thanks a lot.
Davide