Learning XMega clock sources

Any microcontroller needs some clocking mechanism. This is how it performs instructions, count time, generate signals. Normally controller comes with many clocking options as there may be different needs of clocking speed and accuracy. Sometimes you may want to squeeze maximum performance out of it, then you would probably select the highest clock speed. In this case you would loose energy efficiency over performance. Sometimes you only need to send simple control commands and keep time. Then you would choose 32.768kHz clock source which helps to preserve energy and do the job. This is why microcontrollers have so many clocking options available. Shawon wrote pretty good guide about selecting and setting Xmega microcontroller clock source. He explains internal clock sources by listing their benefits and limitations. Then he takes to external sources and usage of PLL (Phase Locked Loop) to multiply crystal clock up to limits. Then he does several experiments to check few clock settings if they are correct by measuring waveforms with scope. Be sure to understand how clocking mechanism work in any micro before you dive any… Continue reading

Using CMOS camera in line followers

Having reliable sensors in robotics is an essential criteria of winning a game. Take line followers. They have to follow a line on a floor where line is contrasted out of background. In most cases a reflective sensor is used line IR diode in pair with IR detector. Diode simply emits light while detector reds intensity of reflection. Comparing reflection intensity from background and line robot can decide weather robot is along the line or not. In practice things are far more complex. Reflection sensors may give bogus readings depending on various factors like varying ambient light. Ikalogic suggests to try using CMOS camera as sensor. So where is a problem of using cameras as sensors? First of all it’s more expensive solution because cameras aren’t as cheap as IR sensors. Second stopping factor is the fact that camera outputs lots of data and small microcontrollers haven’t enough power to process it. Not every hobbyist want to transfer his design from like AVR to ARM. But wait a minute. We don’t need capture beautiful images, but to follow line only.… Continue reading

Small fully featured atxmega32 scope

If you are looking small flexible and cheap scope for your projects, this might be great choice. Scope is built around ATXmega32A4 microcontroller. Miniature scope is equipped with 0.96” OLED display where signals are viewed. Scope can be set to work as dual channel analog scope and 8 digital logic analyzer. Max sampling rate is 2MSPS what gives 318kHz analog bandwidth – more than enough for most hobby projects. Device can also be set to work as signal generator with lots of features. Schematics and code are available for download, but if you would like not to mess with building process then you can get it for very reasonable price. Continue reading