I needed a 38 kHz wave no matter the shape. So I started off with a 555 timer to produce a 38 kHz rectangular wave using its astable mode. Here's the circuit:
For that I used R1=9.8kohm, R2=17.6kohm, and C=820pF. At the beginning, the frequency I measured was right at 38.2 kHz but as time passes by the output frequency started scaling up for as much as 2 kHz. I mean, the frequency increased by 2 kHz in less than half an hour. I tried to change the type of the capacitor just to make sure that the capacitor was ok. But I didn't get a constant freq. either. Maybe it's with 555 timer that makes it behave like that?