| Author |
Message |
|
|
Posted: May 31, 2010 - 07:19 AM |
|

Joined: May 16, 2010
Posts: 15
|
|
Hello one and all,
i need to use counters and DACs to design a PLL. I was suggested I use micro controllers to implement the same by my professor. After going through the Atmel website, i noticed only the XMEGA series of chips have dedicated DACs. So I figured I'll settle on ATxmega128A1.
But that was the easy part, when it came to picking a development board, along with some way enabling USB programming of the chip, frankly I am quite confused. One reason i settled on ATxmega128A1 was because it is supported by the ATavrxplain board (which costs just $30). But well my joy short lived though when I found that it doesn't support USB programming of the chip.
Well the next best option I figure is the STK-600 board along with the TQFP100 adapter board. But still I am unable to confirm if this combination will support USB programming or is there some other hidden cost involved??
Please help me out here, as I do think I have given sufficient time researching about the ATMEL products, but I am too inexperienced when it comes to micro controllers to go ahead and make a confident purchase.
so my questions are:
1>is XMEGA the right choice for my requirements?
2>would the STK600 & TQFP-100 adapter boards be sufficient to fulfill all development and programming (especially USB programming) needs of the above chip?
3>in particular is ATxmega128A1 the right choice or is there anything amiss??
Thanks for reading. |
|
|
| |
|
|
|
|
|
Posted: May 31, 2010 - 08:25 AM |
|

Joined: Dec 30, 2004
Posts: 9006
Location: Melbourne,Australia
|
|
First up, why do you need a DAC when designing a PLL? All you need is one port pin and a RC network.
Would a Xplain board and a Dragon not suffice? |
|
|
| |
|
|
|
|
|
Posted: May 31, 2010 - 08:51 AM |
|


Joined: Jan 23, 2010
Posts: 840
Location: Edmonton, Alberta
|
|
|
|
|
|
|
Posted: May 31, 2010 - 11:10 AM |
|


Joined: Jul 06, 2009
Posts: 120
Location: Heppner, OR
|
|
| You can program the Xplain via USB using Dean Camera's AVRISPmkII clone included in LUFA (see http://www.fourwalledcubicle.com/AVRISP.php). This firmware installs on the companion AT90USB chip, which acts as an onboard USB programmer for the XMEGA. I think newer versions of the XPLAIN have a USB bootloader installed on the AT90 allowing you to install the AVRISPmkII clone, but I'm not completely sure. |
_________________ http://www.mattairtech.com/
Gentoo Linux
|
| |
|
|
|
|
|
Posted: May 31, 2010 - 11:15 AM |
|


Joined: Jul 27, 2001
Posts: 7429
Location: St. Leonards-on-Sea (UK)
|
|
| A DAC is sometimes used with a PLL for fine-tuning by shifting the reference frequency. |
_________________ Leon Heller
G1HSM
|
| |
|
|
|
|
|
Posted: May 31, 2010 - 11:31 AM |
|


Joined: Jul 06, 2009
Posts: 120
Location: Heppner, OR
|
|
|
|
|
|
|
Posted: Jun 01, 2010 - 10:16 AM |
|

Joined: May 16, 2010
Posts: 15
|
|
Thanks for the replies
@Kartman - did a little digging on the Dragon. I found this.
So considering the cost and effort required to get it up and running, the STK600 + TQFP-100 adapter seems the best option.
@tlucas - thanks for the link, it clears up things on the programming methods front.
@physicist - very useful info. But considering I am a novice I am going to stick with the STK-600. I will definitely try this out in the future. |
|
|
| |
|
|
|
|
|
Posted: Jun 01, 2010 - 10:59 AM |
|


Joined: Jul 18, 2005
Posts: 62941
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
|
Quote:
2>would the STK600 & TQFP-100 adapter boards be sufficient to fulfill all development and programming (especially USB programming) needs of the above chip?
Define "sufficient" and "development".
The fact is that the STK600 is a great board to mount the CPU on and will do a fine job of programming it, clocking it and powering it but the thing it won't do is debug it. To debug it you need one of:
$50 Atmel Dragon
$299 JTAGICEmkII
$599 AVR One! |
_________________
|
| |
|
|
|
|
|
Posted: Jul 01, 2010 - 10:10 PM |
|

Joined: May 16, 2010
Posts: 15
|
|
Well the original college project for which the microcontrollers were required was scaled back, hence the delay. But now I am planning to buy one for myself.
clawson wrote:
Define "sufficient" and "development".
Well thats the whole problem, I know next to zilch about micro-controllers other that what i have read on the net. So until I actually get started, I dont really know the answer to above question.
EDIT:to add I plan to basically start with using features like PWM, ADC, DAC. That is to evaluate them on the board itself. Later will use this knowledge to implement the chip in a standalone circuit.
clawson wrote:
The fact is that the STK600 is a great board to mount the CPU on and will do a fine job of programming it, clocking it and powering it but the thing it won't do is debug it. To debug it you need one of:
$50 Atmel Dragon
$299 JTAGICEmkII
$599 AVR One!
Forgive me if its too noobish, but what exactly is debugging?
Is it something like you write a program for a certain MCU then load it on to it. And later you when you want to make a minor adjustment to the program without touching most of the code, you 'debug' it??
Will be greatful if someone could answer. Thanks. |
|
|
| |
|
|
|
|
|
Posted: Jul 01, 2010 - 10:22 PM |
|


Joined: Jul 27, 2001
Posts: 7429
Location: St. Leonards-on-Sea (UK)
|
|
| Programs of any size rarely work first time, because of bugs. Debugging is the process of bug eradication. |
_________________ Leon Heller
G1HSM
|
| |
|
|
|
|
|
Posted: Jul 02, 2010 - 02:19 AM |
|


Joined: Dec 11, 2007
Posts: 6980
Location: Cleveland, OH
|
|
If you use the Xplain board you use a cable to attach it to the STK600. You do not need the STk600 Adapter gizmo-thingie.
JC |
|
|
| |
|
|
|
|
|
Posted: Jul 02, 2010 - 06:24 AM |
|

Joined: Dec 30, 2004
Posts: 9006
Location: Melbourne,Australia
|
|
| bug = defect. It is very hard to write defect free code and very easy to write defective code. Therefore one needs to test the code and remove the observed defects. A 'debugger' allows you to suspend operation of the controller, examine variables, step through the code etc. Without such tools it becomes a case of: write code, load code, run, fix problems, repeat. otherwise known as 'crash and burn' |
|
|
| |
|
|
|
|
|
Posted: Jul 02, 2010 - 11:54 AM |
|

Joined: May 16, 2010
Posts: 15
|
|
Thanks for clearing my doubt.
So do these DIY clone debuggers (eg, the Dean Camera's AVRISPmkII clone) work well if built correctly? |
|
|
| |
|
|
|
|
|
Posted: Jul 02, 2010 - 01:26 PM |
|

Joined: May 16, 2010
Posts: 15
|
|
|
physicist wrote:
You can program the Xplain via USB using Dean Camera's AVRISPmkII clone included in LUFA (see http://www.fourwalledcubicle.com/AVRISP.php). This firmware installs on the companion AT90USB chip, which acts as an onboard USB programmer for the XMEGA. I think newer versions of the XPLAIN have a USB bootloader installed on the AT90 allowing you to install the AVRISPmkII clone, but I'm not completely sure.
One quick question: from what I have read this clone will allow debugging of "any" AVR right? (In my case a xmega128A1 with STK 600)
BTW can anyone point me to the reference schematic of the device?? |
Last edited by pannaguma on Jul 02, 2010 - 01:36 PM; edited 1 time in total
|
| |
|
|
|
|
|
Posted: Jul 02, 2010 - 01:29 PM |
|


Joined: Jul 18, 2005
Posts: 62941
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
|
Quote:
will allow debugging
No, the AVRISPmkII (that it clones) is a programmer, not a debugger. |
_________________
|
| |
|
|
|
|
|
Posted: Jul 02, 2010 - 01:42 PM |
|

Joined: May 16, 2010
Posts: 15
|
|
| ^^My bad! Sloppy reading by me. |
|
|
| |
|
|
|
|
|
Posted: Jul 02, 2010 - 01:50 PM |
|


Joined: Sep 04, 2002
Posts: 21393
Location: Orlando Florida
|
|
| Debugging is a subject worthy of a masters thesis just like compilers and cpu architectures. If you write your program in a high level languge like c or pascal or basic and run it and observe incorrect results, then what? Chances are, some intermediate calulation is incorrect. One way to observe the value of variables is just add a print statement, and you can comment it out later. Twenty years ago, this was a big hassle... it took a LOT of work to edit, compile, assemble, link, then maybe erase a bunch of roms and reprogram them, but I did it day in day out for years. You kids nowadays have it easy. Dont need to change floppies to read in the whole source file. Hit one button and the whole thing compiles. You're spoiled. Anyway, cpu designers have added features to help the debug process.... AVR cpus have 'debugwire' which lets the debugger on the pc get info from the cpu on register values, and allow stepping thru the binary instructions but disassembled to assembler, or merged with the hi level language source so the carbon based units can see what line of code they are stepping through. |
_________________ Imagecraft compiler user
|
| |
|
|
|
|
|
Posted: Jul 02, 2010 - 02:20 PM |
|


Joined: Mar 12, 2003
Posts: 996
Location: Portland, Oregon USA
|
|
I believe that you are getting too deep into the techno-babble to solve the 'application'. The application, as you 'spec'-ed (defined the specifications of the application) it in your initial post, was to design a PLL using counters and DAC. Am I correct in assuming that PLL means Phase-Lock Loop? There are a million acronyms in electronics and when you learn all of those, there are a million new ones to learn.
The unspoken assumptions of the application is that you want to pass the course. The undefined elements of the spec are (one) how fast must the phase-lock loop frequency be? (two) how wide a range from the center frequency must the PLL lock and track the center frequency? (three) Are you absolutely required to use counters and DAC (I assume Digital-to-Analog converter) in the design? (four) If counters and DAC are required, then need they be separate ICs or part of a controller or FPGA? (five) what is the maximum cost of the parts per unit? (six) what is the maximum cost of the engineering design time? (seven) Is the purpose of the assignment to teach designing a PLL, or is it to get the students to learn how to make the client give an accurate and fully-detailed specification of the application? (which is more important in the real-world), (eight) Can you just bring in a working PLL chip and get credit for the assignment?
Phase-lock loops are primarily used to lock radio receivers to a specific frequency. When the components start heat, the freq wanders and the PLL returns it. They are also used to 'synthesize' a frequency for digital radio tuning. They can be used to recover a signal from a frequency-modified transmission. The correction voltage used to keep the loop locked is the signal (voice, music, FSK (another acronym) being transmitted.
If you can get away with just point #8 above, then use a 74HC4046 IC, which can be used to phase-lock a square wave up to about 20 MegaHertz. I'm not sure what you would use a DAC for in a PLL, but the counters would be used to synthesize a frequency. The counters change the freq of the VCO output and the capture lock has enough range to lock onto it. The VCO output before the counter/dividers is the 'synthesized' frequency. |
|
|
| |
|
|
|
|
|
Posted: Jul 02, 2010 - 08:06 PM |
|

Joined: May 16, 2010
Posts: 15
|
|
|
bobgardner wrote:
AVR cpus have 'debugwire' which lets the debugger on the pc get info from the cpu on register values, and allow stepping thru the binary instructions but disassembled to assembler, or merged with the hi level language source so the carbon based units can see what line of code they are stepping through.
Thats some detailed info thanks. |
|
|
| |
|
|
|
|
|
Posted: Jul 02, 2010 - 08:28 PM |
|

Joined: May 16, 2010
Posts: 15
|
|
@all - In general, can one get the job done with the "CRASH and BURN" approach, OR is it just too hassling & a debugger is absolutely essential?? (If someone can clear this, then I can move ahead with my purchase) Thanks.
@Simonetta
Hey, first of all I appreciate the very detailed reply.
Okay let me backtrack a bit. My original project was an hardware implementation of a comb generator. It was supposed to include a closed loop design(ie, PLL) to get accurate output.
Later on due to several reasons my prof scaled it down and and presently asked me to implement a simple open loop design.
During my initial research for the project into micro-controllers, I got a bird's eye view of all the possibilities with them. For two years of my engineering I have thought of micro-controllers as something solely related to robotics. Now having realized their virtually unlimited utilities, I am planning to buy these development boards with my own funds, so that at-least at the end two more years I can be a lot more proficient in them.
EDIT:Damn! The STK600 no longer available at $99. Guess I may have to settle for the STK500 after all. |
|
|
| |
|
|
|
|
|