help on codevision..AVR

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Could any one guide me how to program in Code vision AVR...

1. how to access individual bir of GPIO..
2. to access the hole 8 bit SFR.. of GPIO...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think you'll find it's pretty similar in ALL the C compilers:

DDRB=0xFF; //make all port lines output
PORTB=0xAA; // light up alternate LEDs attached to port

Individual bit access is a bit more complicated but the following describes a technique that works in ALL the C compilers:

https://www.avrfreaks.net/index.p...

but note that CV also has a special feature (but one that won't work if you ever move to other C compilers) of being able to do things like:

PORTB.3 = 1;
PORTB.5 = 0;

to switch the state of just single bits.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Also note that this has nothing to do with AVR Studio, and is therefore in the wrong forum.

Regards,
Steve A.

The Board helps those that help themselves.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks folks, i found it im workin on it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Now i want to create a pulse width modulated sine wave from the controller could any one help me on sowft ware coding . ill tell u wht i did .

i prepared my hard ware that works on pulse width modulated square wave signal and i drived a motor too but every thing by means of hard ware .

Now i want to drive and control by software by creating a PWM square wave and PWM sine wave from controller.

suggest me whether my idea is better to generete sine weighted pwm signal,

i hav created a look up table which will hav a values from sine angle of 0 to 90. ill assign a pin for output and load the value from look up table to timer one by one which will render me a sine weighted pulse as out put . ill get a 1/4th of sine wave. and ill load the values in decending order to get 1/2th of sine wave i.e sine 180.

again prodceeding with this in loading the timer viceversa i.e accending order (sine 0 to sine 90) and again in decendign order (sine 90 to sine 0)

ill get full AC sine weighted pulse width modulated output .

if u hav any new idea pls let me know n help out guys.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i have problem in codevisionAVR that is "avrprog error getting ID" please give me replay with sollution

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You might be better asking CV support questions on the Yahoo group that is its main support forum.