olimex mt128 beeper?

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

I've got one of those cool little olimex mt128 computers (look in tools).. I now have almost complete control over it... lcd works, buttons, led etc... using iccavr... HOWEVER the beeper is on pe4 and pe5 and I dont know if I'm sposed to shake em up and down 2000 times a sec or what. Is it a beeper of a speaker? Anyone know? No docs from olimex I dont think, just schematic etc....

Imagecraft compiler user

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

I think it is as you described--you need to wiggle it. I dug up with Google the sample code from Olimex:

void BUZZER(void)
{
  while (B4==0)
     {
      	BUZZ1=OFF;			//250us
      	BUZZ2=ON;
      	delay_us(125);
      	BUZZ2=OFF;
      	BUZZ1=ON;
      	delay_us(125);
     }
}                                      

at http://www.olimex.com/dev/avr-mt... It is weired that they wouldn't have a parts list.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Bob,

I think its a piezo element. The Butterfly has one and has sample code for playing tunes on it. In the Butterfly schematic, one leg of the element is connected to Vcc and the other is driven by a transistor with its base to a pin. I'd guess that you could just set one of the pins high and toggle the other. Oh and I'd toggle at about 500 Hz for a test tone.

Good Luck,
Joe

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

OK.... got it working.. but why do they use 2 outputs and not just 1??

Imagecraft compiler user

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

You could drive it from one pin, but two pins allows you to select phase. The same buzzers driven at the same frequency with the i/o pin directions swapped would created sound 180degrees out of phase. I have NO idea why you'd want to do with with a piezo buzzer on a device like the MT128 though =)

-Curiosity may have killed the cat
-But that's why they have nine lives

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

Quote:
I have NO idea why you'd want to do with with a piezo buzzer
It's a bridge configuration (I guess) allowing you double the voltage drive into the transducer or 4 times the power (in watts).

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Oh, so 0/1 would be 'high' and 1/0 would be 'low' Thanks I didn't even think of that, it's so obvious, it's a two-way speaker design basically.

-Curiosity may have killed the cat
-But that's why they have nine lives