Go Down

Topic: 16bit DAC parallel bits, AD669 (Read 2 times) previous topic - next topic

GoForSmoke

If you use shift registers it will be a bit slower than writing 2 8-bit ports. But what do you need for speed? The difference is a small fraction of a millisecond.

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Nick Gammon

I withdraw my suggestion about the 595 register, that is an output one. But something like the 74HC165 will do input.

GoForSmoke

#7
Feb 25, 2013, 12:58 am Last Edit: Feb 25, 2013, 01:04 am by GoForSmoke Reason: 1
Some of these are even bi-directional:
http://www.futurlec.com/cgi-bin/search/search.cgi?search=shift_register&search_base=0&page_no=1

I don't know those people but I have bought from them a few times and never a problem with an order. Obviously though, you don't just buy 1 or 2 50-cent chips on a $4+ shipping charge. But they have component bags and all kinds of goodies. The prices are close enough to eBay for me and these guys do have datasheets so I know what I'm ordering, not just hoping it is what it seems.

(ships from Hong Kong, there's a how-long table)

Quote
SHIPPING METHODS
For Australian, Canada, UK, EU and USA customers, we can offer domestic postage rates as follows,

USA, Canada, UK, European Union(EU) and Australia

   Standard Post*
   For orders up to US$29, Delivery Charge - US$4.00.
   For orders US$30 to US$49, Delivery Charge - US$6.00
   For order US$50 to US$99, Delivery Charge - US$9.00
   For order US$100 and above, Delivery Charge - US$14.00

   Express Post - Express Pak Only
   For orders up to US$99, Delivery Charge - US$22.00.
   For order US$100 and above, Delivery Charge - US$44.00
   For orders shipped in Cartons, Express Charges are charged at actual cost.

   Courier - Courier Pak Only
   For orders up to US$99, Delivery Charge - US$33.00.
   For orders US$100 and above, Delivery Charge - US$66.00
   For orders shipped in Cartons, Courier Charges are charged at actual cost.


All Other Countries

   Standard Post - Air Mail*
   For orders up to US$29, Delivery Charge - US$5.00.
   For orders US$30 to US$49, Delivery Charge - US$7.00
   For order US$50 to US$99, Delivery Charge - US$12.00
   For order US$100 and above, Delivery Charge - US$18.00

   Express Post - Express Pak Only - Where Available
   For orders up to US$99, Delivery Charge - US$28.00.
   For order US$100 and above, Delivery Charge - US$55.00
   For orders shipped in Cartons, Express Charges are charged at actual cost.

   Courier - Courier Pak Only
   For orders up to US$99, Delivery Charge - US$45.00.
   For orders US$100 and above, Delivery Charge - US$75.00
   For orders shipped in Cartons, Courier Charges are charged at actual cost.



Hmmmm, after the USPS charges thread I have to wonder if the site needs updating or they subsidize the difference. And heyyy, ship to Down-Under is the same as to the US!
I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

SuperR

#8
Feb 27, 2013, 01:26 pm Last Edit: Feb 27, 2013, 02:01 pm by SuperR Reason: 1
Ok, I think I got it up and running. I now need to write some code to transform a value of desire to 16 parallel bits. I have enough digital output pin available so I would like to use just the 16 output pins for the data.

Any suggestions?

I have looked at bitRead. That seems to work but puts out a value of 1 or 0 while ideally, I want a LOW or HIGH.

for instance, for bit 0, I would like to output;

I did not expect this to work but it does;

  •   digitalWrite(2,bitRead(8,3));
      delay(2000);
      digitalWrite(2,bitRead(8,2));
      delay(2000);



GoForSmoke

Here's you pin map:
http://arduino.cc/en/Hacking/PinMappingSAM3X

You have Ports A, B, C, D with pins as SAM3X pin names PA##, PB##, etc.
If you can get 16 pins in a row on the same port then you should be able to write 16 bits to that port in one go. Once the bits are written however you do it, the pins should reflect what you wrote. It's a lot quicker than setting 16 pins 1 at a time.



I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Go Up