Parallax 2x16 Serial LCD (27977) Backlit, w/ Spkr - Example Prop snd SPIN code??
tdg8934
Posts: 126
I bought one of these from Radio Shack a week or so back and it says that version F has a speaker for music but there is no example code for the Propeller (nor BS2).
I had a few of these in an earlier version when I programmed the SX chip sometime back but wanted to hear the sound capability in this new one for the Propeller.
Why is the released datasheet incomplete?
Has anyone written any example code for the music tones? I'm a bit surprised no one has brought this up yet - from what I searched on in the forum posts.
I'm just learning the Propeller and would like somewhere's to start as I know nothing about music either.
Thanks!
I had a few of these in an earlier version when I programmed the SX chip sometime back but wanted to hear the sound capability in this new one for the Propeller.
Why is the released datasheet incomplete?
Has anyone written any example code for the music tones? I'm a bit surprised no one has brought this up yet - from what I searched on in the forum posts.
I'm just learning the Propeller and would like somewhere's to start as I know nothing about music either.
Thanks!
Comments
http://www.parallax.com/Portals/0/Downloads/docs/prod/audiovis/27976-7-9-ParallaxSerialLCD-v3.0.pdf
and the old kickstarts page has some basic code examples.
http://sites.google.com/site/parallaxinretailstores/home/2x16-serial-lcd-backlit
I didn't know about the Kickstart site. Thanks. However, version 3 nor the Kickstart site has example code on how it is implemented to let's say play a tune in either the BS2 or Propeller. Commands and documentation are nice about the notes but not complete if the user isn't shown HOW they are supposed to be implemented like they barely do for the basic LCD commands for text.
I'm not trying to be negative but just pointing out that version 3 of the document needs to be updated for music/notes implementation for the Propeller/BS2 (especially if they are being sold in the off the Parallax website for new users not knowing what to do).
I can figure this out as I have written many SX/B programs for the LCD before, but it would have been nice to have had example code possibly showing tricks/tips or a good way to do this for Music on the Propeller and BS2.
Thanks again.
To send commands from the command set, the datasheet has you covered by explaining that the appropriate bytes need to be sent. For example, to clear the screen and turn on the backlight:
So, using the same methods, we can send commands from the command set table to play an 'A' quarter note. Decimal 210 sets the note length to a quarter and decimal 220 plays an A note at whatever length and scale is currently active.
So, here is a short little bit of SPIN code where I laid out the music data in a DAT table
Once a length or scale has been setThe entire code and more explanations for it is on this thread here, where someone had the same question as you.
As for reading music, here are a couple simple pictures that help me.
Lettered music scale:
Note length explanation: