Questions tagged [codevision]

Codevision AVR compiler is a C cross-compiler, Integrated Development Environtment (IDE), and Automatic Program Generator designed for the Atmel microcontroller series.

Filter by
Sorted by
Tagged with
1 vote
1 answer

How do I measure distance of Ultrasonic Sensor HC-SR04 using the ATmega328P Timer Input Capture?

I am using an ATmega328P MCU with an 16 MHz external oscillator. I need to measure distance of Ultrasonic Sensor HC-SR04 using the ATmega328P Timer 1 Input Capture interrupt. I have to measure the ...
Pumbaa's user avatar
  • 25
0 votes
1 answer

RTC with ATmega32 and DS1307 showing the year completely wrong

I'm building a clock/calendar with an ATmega, a DS1307, and a 20*4 LCD (LM044L). I have implemented the code showing the time correctly, I have initialized the RTC too, but for some reason when I try ...
Hitman2847's user avatar
0 votes
2 answers

Smoke calculation with mq2 sensor

How to calculate the amount of smoke output from the mq2 sensor?
Akon's user avatar
  • 1
1 vote
0 answers

How to use ATMega USART in synchronous mode using XCK pin

I'm working on a project with ATMega64 and I have a problem with one of the USART interfaces which is going to work in synchronous mode. when trying to send a test data like: ...
Majid Roustaei's user avatar
4 votes
1 answer

Read and Write multi variable (Struct) from/to external FRAM memory over SPI by ATMEGA Using Code Vision

I am working on a project to read some data from ADC and store them in external FRAM over SPI. I have 8 different float values which need to save when the power is off or other specific situation and ...
hossein's user avatar
  • 43
-2 votes
2 answers

A serious problem with 2 or more ADC of ATmega16

I have enabled 2 ADC of my microcontroller but there is a lot of noise. I mean when ADC(0) is enabled, everything is good but after enabling ADC(1) the noise kick in. Here is my code: ...
Hossein's user avatar
0 votes
1 answer

ATMega128 Operators

I'm using the ATMega128 micro for a project and CodeVisionAVR. It seems as if when I try a += with 2 floats, it doesn't calculate properly. For example, if I'm doing a PI loop for the integrator and ...
biggi_'s user avatar
  • 146
0 votes
1 answer

How Can i Protect my Oscilloscope from high voltages?

I made an oscilloscope with AT90USB series(activated ADC in micro and send data to my own program in PC via USB).I dont need more than 0-5v but you can never tell.I know I can mislead higher voltages ...
user avatar
0 votes
1 answer

can't read&store in global variable in function OR can, but get error reading ds18b20 sensor

I'm using Atmega8 with CVAVR 2.05.0 and trying to slightly modify the way ds18b20 library works. I want to store temperatures from sensors in global array and start conversion for all sensors at one ...
nekit_p's user avatar
1 vote
1 answer

Read DS2401 with ATmega 32 and a 1-Wire protocol

DS2401 is a 64-bit ROM memory that used as a hardware-serial-number. [Datasheet : here] It has only two pin. One of them is ground and one of them is Data/Power pin. So for communicate with this chip ...
TheGoodUser's user avatar
1 vote
1 answer

Simulate DS2401 with ATmega32?

I have a DS2401 and an ATmega32. I can read the its contents with my AVR micro-controller. I want to know, Is it possible to simulate the DS2401 with my ATmega32? I mean is it possible to connect ...
TheGoodUser's user avatar
0 votes
1 answer

One-Wire data transfer with a DS2401 via AVR [closed]

I've an ATMEGA32 and a DS2401 (64 bit ROM - Silicon serial number). I want to read its contents. Can anyone help me giving me a clue, sharing a pdf tutorial link for One-Wire communication or a ...
TheGoodUser's user avatar
0 votes
1 answer

My OLED 128x64 0.96 inch(with SSD1306 driver) doesn't work!

I'm working to use of this OLED but I don't know why doesn't it work!? the Schematic of adaptor is this: and this is assembeled project on breadboard: when I check out the pins of SPI of ...
Roh's user avatar
  • 4,640