frequency gen
Hi guys!
I've been away far too long and I've gotten out of practice in SX land.
I'm trying to make a square wave generator that I can adjust from about oohhh say 75khz up to about 450khz
is this going to be do-able on the SX? Like I said, I'm having trouble getting back into the thing.
I grabbed one of the examples and just have a toggle RA.1 and my scope shows this at 8.5khz with my SX clock set to 4mhz
I do have the pieces parts to set it to run at 50mhz. Because I just scabbed that code, I dont have anything I can post to start.
in the big picture, I want to sweep that frequency range and at the same time have a current sensor to figure out at which point in that frequency range I get the highest current flow, if that helps or makes any difference.
thanks
paul...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
stand back! I have a slide rule and I know how to use it!
I've been away far too long and I've gotten out of practice in SX land.
I'm trying to make a square wave generator that I can adjust from about oohhh say 75khz up to about 450khz
is this going to be do-able on the SX? Like I said, I'm having trouble getting back into the thing.
I grabbed one of the examples and just have a toggle RA.1 and my scope shows this at 8.5khz with my SX clock set to 4mhz
I do have the pieces parts to set it to run at 50mhz. Because I just scabbed that code, I dont have anything I can post to start.
in the big picture, I want to sweep that frequency range and at the same time have a current sensor to figure out at which point in that frequency range I get the highest current flow, if that helps or makes any difference.
thanks
paul...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
stand back! I have a slide rule and I know how to use it!
Comments
· I'll assume you are using the SX28. I have attached a program that will generate the frequencies.
· If you are using the SX48 the task is much simpler because you can use one of the hardware timers. Therefore no interrupts to mess up the timing of the foreground program.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.iElectronicDesigns.com
I have a couple sx48 protoboards that I can· use, no problem. I would probably use one any way because I will want to hook up some sort of display so that when it finds the frequency with the highest current, that frequency will be displayed. and the 48 will give me a little more room.·
graphing the current vs freq on a graphic LCD would be really cool too ;-) but first things first.
why?·· to help me get these things http://www.youtube.com/watch?v=ku5nZionoRs· tuned. tuning "by hand" is a PITA and the calculators for the frequency can be way off
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
stand back! I have a slide rule and I know how to use it!
Post Edited (Dunnsept) : 2/11/2008 1:27:06 PM GMT
· WOW! Do you sell these ?
· Here is the code for the SX48. I don't have an SX48 available at the moment to test this code.
· How do you plan to measure the current ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.iElectronicDesigns.com
for measuring the current, I was looking at one of the maxim high side current-sense ICs. Analog makes some too. both output a voltage proportional to the sensed current.
the output of this will drive a TI mosfet driver, driving of course, a mosfet. when the input frequency matches the resonant frequency of the coil, current is at it's highest because inductive and capacitive reactance is at a minimum and the coil is seen as (almost) a purely resistive load
wanted to mention too, congrats bean. looks like SX/B has really come a long way. I hardly recognized it ;-)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
stand back! I have a slide rule and I know how to use it!
Post Edited (Dunnsept) : 2/11/2008 3:10:03 PM GMT
put this together on an SX48 protoboard. calculated freq is 74.850
I hooked it up to my scope, actual freq = 74.943
thanks.
now I just have to figure out why my hc4 quits working after it hits 240khz (all I'm displaying is the int part of khz)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
stand back! I have a slide rule and I know how to use it!
Paul...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
stand back! I have a slide rule and I know how to use it!