PGA2310 "how to"

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hi guys, I have built a TDA2052 chip amp, and want to impliment a PGA2310 volume control. I have done some (very) simple PIC programming, and wondering if anyone knows of a tutorial or something of the sort for the use of a PGA2310 (most importaintly the serial communication) I have tried google, but the best I got was someones code which was commented in German.

Thankyou!
 
rtarbell said:
Hello all,

I am doing this right now - it's a good project to start with!

When you say that you have had experience with PICs, did you want to do this project with assembly or C? Do you have a current version of MPLab and a programmer?


Are you using IR remote control? Also are you using a LCD display?

Rhys
 
I am using an LCD 16X2 display for messages. I was using an infrared remote control (with a PNA4602 as the receiver, and an 18F1221 with 555 Timer in the remote for a transmitter), but I disabled it to focus on other issues. I never got the infrared receiver to receive the messages properly. There were always timing issues that I saw on the receiving end of it, so I just skipped the remote control thing to get the rest of it working.
 
rtarbell said:
I am using an LCD 16X2 display for messages. I was using an infrared remote control (with a PNA4602 as the receiver, and an 18F1221 with 555 Timer in the remote for a transmitter), but I disabled it to focus on other issues. I never got the infrared receiver to receive the messages properly. There were always timing issues that I saw on the receiving end of it, so I just skipped the remote control thing to get the rest of it working.


You should take a look at the sony / philips IR protocol, and use a infared remote control. It would be a lot easier, you can just find the codes on the internet.
 
"You should take a look at the sony / philips IR protocol, and use a infared remote control. It would be a lot easier, you can just find the codes on the internet."

Indeed! I would suggest, at least for the remote, that

A) Make it the last thing to do on your project (just so that you know that everything else works)
B) Use a simple chip that implements a simple remote control protocol (Sony, Phillips, RCA, etc.) Similarly, Holtek (www.holtek.com) makes some chips
specifically for remote control applications. They can encode and decode for you – very simple!

Instead of using one of these chips, I tried to make my “own” remote control protocol, which is probably why it didn’t work! Just to give you an idea, it looked like this:

Transmitter side
When user presses a button, send 8 bits of volume control data through 18F1220 UART at 9600 baud --> Modulate signal at 38kHz using 555 Timer --> 900nm LEDs used to send infrared

Receiver Side
PNA4602 infrared receiver demodulates signal at 38kHz --> 18F4520 UART receives information and decodes the 8 bits to determine what was sent
 
Hi guys, thanks for replies!
Either C or assembly would be fine, hopefully well commented though!!!

I will eventually impliment a remote and LCD's and source selectors and even computer connection as the system will run in every room of the house with the ability to connect to any source, change song or radio frequency and have independent volume in each room.

Thanks heaps!
 
"I cant do this. I have tried and tried with assembler but i cant get it to work, all i am trying to do is switch a relay on and off with a remote control string, and have its status displayed on the screen."

Do you have an oscilloscope available to see your data signals? What PIC microcontroller are you using? An oscilloscope would be nice to see the data being sent to the PGA2320.

For my project, I have 8 buttons on the front panel of the unit (“local buttons”), and then the “same” 8 buttons on a remote control. Does your unit have local buttons on the front panel as well? I would get these local buttons working before I tried to get the remote control working. If you are getting messages to display on your LCD, then it sounds like you have the correct underlying functions, so that’s a great step in the right direction!
 
rtarbell said:
"I cant do this. I have tried and tried with assembler but i cant get it to work, all i am trying to do is switch a relay on and off with a remote control string, and have its status displayed on the screen."

Do you have an oscilloscope available to see your data signals? What PIC microcontroller are you using? An oscilloscope would be nice to see the data being sent to the PGA2320.

For my project, I have 8 buttons on the front panel of the unit (“local buttons”), and then the “same” 8 buttons on a remote control. Does your unit have local buttons on the front panel as well? I would get these local buttons working before I tried to get the remote control working. If you are getting messages to display on your LCD, then it sounds like you have the correct underlying functions, so that’s a great step in the right direction!


I do not have a scope at this current time, there is no way i can afford to get one of any kind unfortunitly :( . I am using the AVR ATtiny2313 microchip for this project, as i have never a dev station on hand.

Are you coding your project in C?

To start off with, i am trying to get a push button, connected to a I/O pin directly, to toggle a relay on / off that is also directly connected to a I/O pin, and have the status displayed on screen, can you point me in the right direction (Im a C noob!)

I have no plans to implament local buttons at the moment, as i am trying to keep everything neat and tidy.

If you dont mind, would it be possible for me to have a look at your source code so far (not to copy you, or sell your idea) just to get a insight on what is going on. My email address is rhysATpressure-drop.org (@) if this is okay with you?

Thankyou!
 
Hey guys,

Sorry about the delay - I haven't forgotten about it, I'm just trying to find the code project, and "spruce" it up a little so that it's readable. I wrote it in Microchip's C18/MPLab compiler, so it may not make entire sense to someone using Atmel and the AVRs (GCC compiler probably?).

One nice thing about the C code itself, is that C code is C code (unlike assembly, which can vary widely between microcontroller makers!).
 
rtarbell said:
Hey guys,

Sorry about the delay - I haven't forgotten about it, I'm just trying to find the code project, and "spruce" it up a little so that it's readable. I wrote it in Microchip's C18/MPLab compiler, so it may not make entire sense to someone using Atmel and the AVRs (GCC compiler probably?).

One nice thing about the C code itself, is that C code is C code (unlike assembly, which can vary widely between microcontroller makers!).

Hi, i am very intrested to see this code! Keep us up to date!

Rhys
 
Also, I just found that I didnt have the right Analog ground connected to anything (Im only working with Right channel atm), but when I connect it, I lose all music, and it sounds like a mix between air and a growling sound!

Any suggestions anyone?

*Cant find shorts or any other problems, but for the moment have disconnected everything on pins 2,3,6,7 til I work out whats going on with the heat and ground connection!
 
Okay! See the attached file for an example of my LCD routines. They are very basic, but I have verified that they work. Like I said, these routines I wrote for the PIC 18F2321, so all of the included files (linker scripts, libraries, etc.) are using MPLab and the C18 compiler. You can get both for free from Microchip's website.
 

Attachments

  • example.txt
    11.9 KB · Views: 155
rtarbell said:
Okay! See the attached file for an example of my LCD routines. They are very basic, but I have verified that they work. Like I said, these routines I wrote for the PIC 18F2321, so all of the included files (linker scripts, libraries, etc.) are using MPLab and the C18 compiler. You can get both for free from Microchip's website.


Thankyou ever so much for sharing this, do you have the schematic for your dev board / whatever you are using to test this?

Rhys
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.