Skip to main content

Nokia 3310 scope experiments part 1

Continuing with the nokia 3310 display experiments, I wanted to try out if visualizing signals with this display could be any useful. For that purpose I wanted to build a simple scope with Arduino. I simply configured the ADC, used the internal 1.1 V reference voltage, configured the analog comparator as a trigger and tried to visualize the incoming samples. All of this has been done using the libpca and the following simple sketch. 



So far, with enough accuracy I did some experiments with signals up to 8 kHz. I don't want to go into details at the moment especially that I consider this project as a work in progress. The ADC has been fed with a sine signal generated using Audacity. The quality of the measurement strictly depends on the ADC frequency. A couple of pictures bellow:


1kHz, sampled with prescaler = 4

2 kHz, prescaler = 4, visible trigger jitter

... same signal, bigger amplitude
 
4 kHz, prescaler = 4
 
6 kHz, prescaler = 4, very distorted

800 Hz, prescaler = 4, visible distortions

800 Hz, prescaler = 32, a lot better quality

Comments

Popular posts from this blog

Arduino MIDI Music Box

It's time to do something useful with our small 8-bit computer. Music box is a fun and easy project. It's not demanding from the hardware point of view but it can be a little bit tricky from the software point of view itself - ideal project to learn a lot and not to spend the whole day soldering. What we will need:  an Arduino (of course)  Piezo buzzer  ... and that's all. Now a couple of words of what we want to achieve.  Requirements  Let's point them out: play monophonic melodies by generating tones (1 channel MIDI instrument) the notes will be send by the PC through the serial port  our musicbox should be visible to the PC as a MIDI port  be able to use MIDI player of choice on PC to play MIDI files on our musicbox  The requirements are specified. Unlike most of the simple projects around which play the same melody everytime, which most of the times is hardcoded in the program memory and in order to change it...

Arduino R-2R ladder Audio DAC

There is a lot of projects out there which use  R-2R ladder and an Arduino to recreate sounds from either SD card or short audio clips programmed directly to MCU's flash memory. Although using SD card is fairly reasonable and provides a lot of flexibility it's not very challenging (from the software point of view) and it requires some additional hardware. Believe it or not we already have all the needed hardware in the Arduino itself. Assumptions In this project I'll play mp3 or any other multimedia files from the PC using Arduino. Bellow are the details: Play PCM 8kHz 8bit Audio with Arduino Audio samples will be transfered via USART from the PC in binary format using SLIP Audio files will be decoded on the PC side and only the RAW data will be send to Arduino Timing Arduino is a powerful machine, powerful enough that it's possible to play audio with even higher sampling rates and bit-resolutions than assumed above, the bottleneck in this...

Generating Tones with Timers

Previously I presented a basic way of using timers in order to generate delays. At this time, we'll learn how to use timers and piezo buzzer to generate tones (beeps). The code for that won't be very different from what we were doing previously. Let's start with defining the requirements of our implementation. Our "beeper" function should allow us to generate a beep of given frequency and duration. Simple as that. Just to quickly summarize, when using timer for delay purposes we configured it in CTC mode and configured the prescaler and OCRXA register value so the timer "overflowed" with a 1 kHz frequency (1 ms period), the delay duration was specified by the number of "overflows". Previously, as long as counting the 1 ms cycles was good enough to determine the duration, now the duration depends on both parameters, the actual duration specified as an input parameter as well as the frequency itself.  Let's list steps that our "be...