![]() I did try to just copy the image into the box, but it wouldn't paste, understandably. sigh I fully appreciate where you're coming from though, so thank you for the forewarning for future posts. Work are really strict about the software on the pcs, and I couldn't do it another way. Unfortunately I am on my work computer, so there is every reason to send it on a word document. Regarding it being able to put two bytes in, you are undoubtedly correct, as it uses a shift register on the DI terminal. With my very limited knowledge on the topic (though I am trying to learn), can you think of anything else I might be able to try in terms of transferring the data? I've been at this for a couple of days, and have got pretty close, imo, but this doesn't quite seem to be working. Thank you for the first piece of information - that's useful knowing that it essentially does the same thing. There are standardized graphic formats (JPEG, PNG) everybody can read without a greater risk, so there's absolutely no need to use proprietary formats best known for their worst security record. That's a correct 16bit transfer and I'm sure the chip is happy with it.īTW: Never, never post a picture inside a MS Word file, otherwise we have to assume you're trying to infect us with malware. Which is doing exactly the same, sending two 8bit values one after the other.ĭoes the datasheet state that there must be no gap in the timing? I doubt. Is there any way to take out this gap in the messages sent so that it appears like it should in the datasheet? For now it should control the LEDs so that they scale up from 0-5V in 1024 equal steps.Īlso, here is an image of the logic analyser results, which lets me know it is almost there: The aim of this is just to test the DAC and get used to operating it/how to interact with it, so that I might use it in more advance situations later in my work. take the SS pin high to de-select the chip: send the address, value and don't care to take the SS pin low to select the chip: SPI.beginTransaction(SPISettings(5000000, MSBFIRST, SPI_MODE0)) run through all of the addresses (they are addressed from binay 1 to binary 8): set pin 10 as the slave select for the DAC: * SCK - to innermost central ICSP pin (SCK pin) * Din - to outermost central ICSP pin (MOSI pin) * An LED and a 220-ohm resisor in series connected from each DAC(A-H) pin to ground Register (10-bit), and two 'don't care' bits (2-bit). One with the address of the register (4-bit), one with the value for the The LTC1660 is SPI-compatible and to command it you essentially send three bytes. This example controls Linear Technology's LTC1660 DAC. Here is my code (with description of circuit): /* Here is a link to the 1660 datasheet: (the important part is on page 10) ![]() The LTC1660 needs a 16 bit message, but my SPI sends it as two 8 bit messages. ![]() I have managed to get all of the code in place to send the message as I want in terms of order and detail, but am struggling when it comes to byte size. ![]() I am currently trying to write to an LTC1660CN DAC via SPI. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |