Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Search found 324 matches
www.mcselec.com Forum Index
Author Message
  Topic: AC Bandgap
mattcro

Replies: 2
Views: 729

PostForum: AVR   Posted: Tue Jan 25, 2011 12:03 pm   Subject: AC Bandgap
You cannot select the 2.56V reference as an input to the comparator (only the 1.1V ref). I think the 2.56V is generated in the ADC circuitry.

However, you could set up the ADC to use internal 2.56V ...
  Topic: completely off topic
mattcro

Replies: 19
Views: 1746

PostForum: BASCOM-AVR Archive   Posted: Fri Dec 24, 2010 10:54 am   Subject: completely off topic
Merry Christmas and best wishes for 2011 from snowy Scotland!

This photo is a view from my house taken on 8th Dec after the first big snowfall. Those icicles are hanging from the gutter.
  Topic: alternate bascom editor?
mattcro

Replies: 12
Views: 1943

PostForum: BASCOM-AVR Archive   Posted: Wed Dec 15, 2010 9:40 am   Subject: alternate bascom editor?
The new IDE looks very impressive, judging by the screenshots in the online help. It looks like a lot of the things I don't like about the current IDE have been changed/fixed, so can't wait to try it!
  Topic: How do i make my ADC read the average value from PWM signal?
mattcro

Replies: 3
Views: 623

PostForum: BASCOM-AVR Archive   Posted: Wed Nov 17, 2010 7:52 pm   Subject: How do i make my ADC read the average value from PWM signal?
You can use a timer to measure the PWM ON period (or the ON and OFF periods) as suggested by Hubert, or you can turn the PWM signal into a proper analog signal by using an RC (resistor and capacitor) ...
  Topic: Earth Connections
mattcro

Replies: 1
Views: 745

PostForum: AVR   Posted: Mon Nov 15, 2010 11:16 am   Subject: Earth Connections
The GND pins are internally connected together, so you could get away with leaving 1 or more of them unconnected... but it's good practice to connect all the GND pins to circuit ground to minimise pow ...
  Topic: Bascom problem with Attiny261 and 3 pwm -> rgb leds
mattcro

Replies: 4
Views: 491

PostForum: BASCOM-AVR Archive   Posted: Fri Nov 12, 2010 10:08 am   Subject: Bascom problem with Attiny261 and 3 pwm -> rgb leds
That looks OK so far, but you also need to configure the PWM1D output, so you need something like TCCR1C=&B01010101 (set PWM1A+B+D to clear up OC1x&!OC1x).

You don't need the interrupt conf ...
  Topic: Bascom problem with Attiny261 and 3 pwm -> rgb leds
mattcro

Replies: 4
Views: 491

PostForum: BASCOM-AVR Archive   Posted: Thu Nov 11, 2010 10:26 am   Subject: Bascom problem with Attiny261 and 3 pwm -> rgb leds
The Tiny261/461/861 timer1 is a lot more complex than the standard AVR timer1, so you'll probably have to configure it by writing to the TCCR1x (config) registers directly. I've never used the tiny261 ...
  Topic: Serial to MMC / SD
mattcro

Replies: 2
Views: 470

PostForum: BASCOM-AVR Archive   Posted: Fri Nov 05, 2010 11:07 am   Subject: Serial to MMC / SD
You should use a byte array for the data, not a string.

You can INPUTBIN the data directly to the Abuffer array to if you want. You need to specify the number of bytes to read for an array...
Inpu ...
  Topic: How can I lower the MOSI pin after writing in MMC
mattcro

Replies: 5
Views: 1114

PostForum: AVR-DOS   Posted: Tue Nov 02, 2010 9:14 pm   Subject: How can I lower the MOSI pin after writing in MMC
Good to hear it's working!

Although the SD card standby or average current is very low, it can draw peak current of more than 50mA during read/write, so you need a regulator that can handle around ...
  Topic: How can I lower the MOSI pin after writing in MMC
mattcro

Replies: 5
Views: 1114

PostForum: AVR-DOS   Posted: Mon Nov 01, 2010 8:31 pm   Subject: How can I lower the MOSI pin after writing in MMC
I now understand why you need to set the SPI pins low.

You can try disabling the SPI port between card reads/writes to allow you to control the pins directly... something like:

Reset PORTB.2 ...
  Topic: How can I lower the MOSI pin after writing in MMC
mattcro

Replies: 5
Views: 1114

PostForum: AVR-DOS   Posted: Sat Oct 30, 2010 4:11 pm   Subject: How can I lower the MOSI pin after writing in MMC
Why do you need the MOSI line to go low? Do you have another SPI peripheral that uses a different SPI mode? If so, you need to change the SPI mode by writing to the SPI config registers before using t ...
  Topic: I2C SENDING 9 BITS DATA LONG
mattcro

Replies: 12
Views: 871

PostForum: BASCOM-AVR Archive   Posted: Fri Oct 01, 2010 8:33 am   Subject: I2C SENDING 9 BITS DATA LONG
The online help for Bascom briefly explains about the clock speed...

The DELAY normally consists of 2 NOP instructions. When the clock is too fast you can specify a delay time(in uS).


and the ...
  Topic: interrupt (timer)
mattcro

Replies: 8
Views: 701

PostForum: BASCOM-AVR Archive   Posted: Thu Sep 30, 2010 7:16 pm   Subject: interrupt (timer)
I think "Timer5" is a reserved word (eg for Xmega). Try naming your interrupt routine something else like Timer1_ISR.

For the Enable statement, "Timer1" means the same as "Ovf1" so you only need "E ...
  Topic: I2C SENDING 9 BITS DATA LONG
mattcro

Replies: 12
Views: 871

PostForum: BASCOM-AVR Archive   Posted: Thu Sep 30, 2010 7:11 pm   Subject: I2C SENDING 9 BITS DATA LONG
Duh, I forgot about Shiftout, because I've never used/needed it... I was thinking hardware features.
  Topic: I2C SENDING 9 BITS DATA LONG
mattcro

Replies: 12
Views: 871

PostForum: BASCOM-AVR Archive   Posted: Thu Sep 30, 2010 9:14 am   Subject: I2C SENDING 9 BITS DATA LONG
The data bus looks like SPI, not TWI. I don't know of any way to generate 9-bit synchronous serial data like this on the AVRs though... you might need to do software bit-banging.
 
Page 3 of 22 Goto page Previous  1, 2, 3, 4 ... 20, 21, 22  Next
All times are GMT + 1 Hour
Jump to: