Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Search found 324 matches
www.mcselec.com Forum Index
Author Message
  Topic: 5 kHz square wave with TIMER0 - troubles again :(
mattcro

Replies: 3
Views: 426

PostForum: BASCOM-AVR Archive   Posted: Mon Feb 04, 2008 11:35 am   Subject: 5 kHz square wave with TIMER0 - troubles again :(
You're trying to implement a software timer there. To get the sort of timings you require, you'll have to use the hardware 16bit timer in PWM mode and set the TOP value (probably register ICR1). You c ...
  Topic: Optimize Code In Options
mattcro

Replies: 3
Views: 365

PostForum: BASCOM-AVR Archive   Posted: Sun Feb 03, 2008 7:24 pm   Subject: Optimize Code In Options
I'm also curious about the optimizations. Code size is usually slightly smaller with optimizations enabled, but what about execution speed? One poster reported on some testing and said optimization ma ...
  Topic: Auto or digital contrast control for graphic LCD?
mattcro

Replies: 1
Views: 268

PostForum: BASCOM-AVR Archive   Posted: Sun Feb 03, 2008 7:20 pm   Subject: Auto or digital contrast control for graphic LCD?
Depending on the LCD bias requirements, you can use a PWM output with an RC filter to provide a variable voltage, or you can try a "digitally controlled potentiometer". These connect to the micro via ...
  Topic: Calling a subroutine inside a module?
mattcro

Replies: 6
Views: 402

PostForum: BASCOM-AVR Archive   Posted: Sat Feb 02, 2008 9:53 pm   Subject: Calling a subroutine inside a module?
Assuming you are defining some subs/functions in the module, you only need to include the module once. Then you can call the subs/functions as many times as you want.

The $include statement simply ...
  Topic: Led fading with PWM
mattcro

Replies: 7
Views: 2133

PostForum: BASCOM-AVR Archive   Posted: Sat Feb 02, 2008 9:44 pm   Subject: Led fading with PWM
You can try removing the "Compare B Pwm = Clear Down" part of the timer config, and only set up Compare A. The Compare B might be confusing things. Also check that you are using the right oscillator f ...
  Topic: External DAC and sinus wave generation.
mattcro

Replies: 5
Views: 766

PostForum: BASCOM-AVR Archive   Posted: Fri Feb 01, 2008 2:06 pm   Subject: External DAC and sinus wave generation.
Also have a look at this Elektor project: http://www.elektor-electronics.co.uk/magazines/2006/february/digital-sinewave-reference-generator.58118.lynkx

It's a 1kHz reference tone generator using an ...
  Topic: External DAC and sinus wave generation.
mattcro

Replies: 5
Views: 766

PostForum: BASCOM-AVR Archive   Posted: Wed Jan 30, 2008 5:57 pm   Subject: External DAC and sinus wave generation.
You don't need to call SPIINIT each time you write a value to the DAC. Move the SPIINIT to Main, or just after CONFIG SPI. This will save some time each sample.

Make sure you configure the SPI cloc ...
  Topic: External DAC and sinus wave generation.
mattcro

Replies: 5
Views: 766

PostForum: BASCOM-AVR Archive   Posted: Wed Jan 30, 2008 1:18 pm   Subject: External DAC and sinus wave generation.
You are trying to do complicated maths (SIN, etc) in realtime on a small microcontroller and this takes *very* many processor cycles. To speed up the sine wave generation, you need to use a lookup tab ...
  Topic: fs_interpreter problems - no commands recognised
mattcro

Replies: 0
Views: 535

PostForum: AVR-DOS   Posted: Mon Jan 28, 2008 2:40 pm   Subject: fs_interpreter problems - no commands recognised
Hi all,

I've just started using AVRDOS and am trying the test_dos_drive demo with fs_interpreter on a M128.

The SD card is detected and initialised OK (I have previously used this setup/card wit ...
 
Page 22 of 22 Goto page Previous  1, 2, 3 ... 20, 21, 22
All times are GMT + 1 Hour
Jump to: