Modular dac project with micro controller and lcd

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Time for a new project and a change of course for me. I have implemented a few dacs, but I have too many ideas so the only way to try everything is to make it more modular.
At some point I would like to make my own pll circuit and insert it between receiver and dac, so separate boards will make this much easier to test. But for now I will just have some fun with different chips.

I plan to use cs8416 and perhaps dix4192 as receiver.

My current list of dacs I plan to try out:
pcm1738
ad1955
I might try pcm1796 and ad1853 too, but I have high hopes for the ad1955 chip so I might stop there.

The chips will be controlled with a micro controller and I have selected at89s51 because it is cheap an has many io ports. It needs to control the chips but besides that it will control a lcd display, attenuator and input selector (I plan to make it compatible to the twistedpairaudio relay boards).

I have attached a draft schematics for the micro controller board. I hope some people in here would be interested in my project and give me comments and suggestions.
 

Attachments

  • atmelboard.pdf
    35.9 KB · Views: 259
I have changed the schematics slightly and made the layout 160x100 mm single sided.

The board should be very useful as a development board because the atmel chip supports "in system programming". In order to program the chip on board, the only thing you need is an old printer cable. I use an at89s51, but at89s52 or at89s53 should also work just fine (they have more flash memory).
 

Attachments

  • atmelboard.pdf
    36.9 KB · Views: 129
Hi Cvillier,

If I may, can I make a couple of suggestions?

1. Why are you using the serial to parallel shift register followed by a 8 way flip flop? You don't need the flip flop afterwards. What I normally use is a 74HC595. With this you can string multiple shift registers together in daisy chain fashion without using more ports on your CPU. This will save you a lot of board space.

2. Instead of using discrete transistors, why don't you use a ULN2803 for driving the relays? Again, quite a saving in board space.

3. I cannot remember if the at89S51 has ADC on board, but what I would do is use a 4051 8 way analogue switch to cycle through your 8 analogue inputs, reading one value after another quite quickly. These values are fed to the on board ADC of the CPU. This will save you some money.

Again, these are only suggestions. What will you use to program the CPU with? C?

Cheers

Gert
 
Thank you very much for your suggestions!

1. Because I don't know all the 74 family... :(
I just searched my local suppliers website and found 167 the first.

2. Not sure here - it might be nice to have the options of inserting larger transistors. But I'll definitely consider it! Is it capable of 500mA on all pairs at the same time? (That would be sufficient I think)

3. at89s51 does not have ADC on board. I don't actually need 8 analog inputs, but I could come in handy to measure temperatures and stuff...
Do you think I'll spend too much cpu time fetching results from the adc?

Forgot to say that I intend to use C for programming.
 
Hi,

Yup, that does look a lot sleeker now!

1. On the 74HC595's you should route your serial data line from pin 9 on U1 to pin 14 on U3, then pin 9 on U3 to pin 14 on U5, resulting in a daisy chained configuration. You will stream a 24bit word when talking to them in your code. Also, I would take all the pin 10's to a port on the CPU, just for in-case you need to do a master reset.

2. Pin 10 on the ULN's need to go to VCC, as these are the common lines for the internal back emf diodes. You will be sinking current for your relays, so the other ends of the relays should also go to VCC.

3. You should be able to sink 500mA on the ULN's, but I doubt you will get that for all channels driven.

4. I'm not too familiar with the ADC that you are using, so I'll have to read up a bit on that before I comment too much. As a matter of interest, I use ATMEGA CPU's, as they have all the peripherals you could ever desire. They're also pretty easy to program (in fact, a little easier than the '51s as they don't need to be 8051 compliant *my opinion of course, in C you wouldn't notice!!*) I use Mega8 and Mega16's, you might want to consider using these. They have ADC on board as well, and for 8 ADC channels I use the multiplexed switch idea that I mentioned earlier. On a Mega8 I have strung 64 AD channels and I poll them all the time, so there is more than enough horsepower.

5. What made you decide on 30pF caps on the crystal? You need to check the specs on the crystal, as I think you will be loading it too much with those big caps. I would suggest you drop those to 15pF to be safe.

I haven't gone over the circuit with a fine tooth comb, but this is what I can suggest for the moment. :D :D

Cheers

Gert
 
Thank you again for your comments!

I will make the serial->parallell 24bit as you suggest - with the space I save I could make a 32bit version instead. ;)

I have to admit that I just inserted the ULN without going into detail on how to connect power pins... I will go through the whole thing before I start etching. Thanks though!

Maybe I should use the mega16 instead. I bought a at89s51 because I thought I only needed digital io, but now I have to order some other parts anyways, so I could just as well pick a better microcontroller. Can mega16 be programmed "in system" using just sclk, miso, mosi, and reset?
Its many years since I programmed a mega, can you split a port to have eg. 3 outputs and 5 inputs? Or do you have to read and write the whole port each time?

According to the datasheet for at89s51, the capacitors should be 30pF +/- 10pF for crystals, so I think it should be all right.
 
I like the Mega16. I generally use it for most of my apps. The at89s51 uses such an antiquated core that you shouldn't worry if there are things that the Mega can't do. The Mega uses JTAG with ISP and you can 'split' the port if you like. You will still be reading the whole port, but using C, you just mask off the bits you don't need. In assembler you can read the bits directly. Out of a user point of view, you will not notice any difference using C between the two micros. Except, you have WAY better peripherals. If you a real man, you will use assembler :D and there you will experience differences in the architecture. Nothing serious, though! For your app I suggest you stick to the free AVR studio application using the GCC C compiler. It is a very nice way to get into AVR's while saving your sanity.

I'm going on holiday on Wednesday, so if you post your schematic before then I'll gladly check it for you :D :D :D

Cheers

Gert
 
I have programmed the mega before - both in C and asm, but I think I'll get the stuff working faster if I just stick to C.

I'm going on holiday too, so I won't be able to make schematics - but thanks anyways, you have been very helpful. :D

My plan is to change to mega16, use the analog multiplexer as you suggested and perhaps use a shift register for the display in order to save an extra io port for talking to dac chips and other interesting things.
 
I would be careful using a serial shift register on a display, especially if you sending 32bit streams. If you are that pinched for IO, run the display in 4bit mode. It is a little more painful to get going, but shouldn't be too hard to get going. The only displays I really battled to get that working is on the Noritake VFD's. The plain Hitachi LCD's are a breeze!

Another sleek option is to use parallel registers and then you can use on 8 bit set for the display. This would use 8 IO lines for the data and one line each for every 74HT574 you use as a latch. It uses more IO than the 74HC595's, but it is quite a bit faster, especially as you are going to use Mega16's

Anyway, I suggest you sit down and make a list of all the requirements you can possibly think of and then you take the compromises that mest suit your application
 
The plain Hitachi LCD's are a breeze!

I have made a small board for my at89s51 so I can play around with the displays. So far I'm not very lucky. I have tried both four and eight bit mode, but I don't seem to be able to write anything interesting. If you have some advice on what init signal I should send I would be very happy!
I have connected two different displays. One is 2x16 and the other is 3x16 - both with 5x7 letters. I am able to make it show some junk but no letters.

I'll wait with the grand micro controller board until I get the lcd and receiver->dac chain working using SPI. This way I'll have a more clear picture exactly what I need and I'm not in a hurry since I have the at89s51 running on a piece of scrap pcb.

I'm also working on the board for cs8416. I have used this chip several times, but only in hardware mode. I would share the spi signals "clock, input and output" between dac and spdif receiver and route "chip select" individually to each board. Now the problem is the cs8416 uses 3.3V logic when connected to the Texas devices and my micro controller uses 5V logic. I guess it would be wise to use a level shifter. Any suggestions for level shifting?
I have found this:
http://www.standardics.nxp.com/support/documents/i2c/pdf/an97055.pdf
(summary: A n-mos per signal with gate connected to vdd(3.3) and pull up resistors on both sides. Source connected to 3.3 end of signal and drain to 5V end.)
Is that the way to go?
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.