Thank you for the confirmation of the 32 bit SPI, Paul had mentioned this 
to me previously but I had not pursued it as what I had was working - 
similarly for the handling of the LE line - I noticed no immediately 
visible difference when moving the dropping of LE to after the SPI Write 
commands though it is clear from the truth table that it should be done 
this way.

I will apply these changes next time I change the code and test - thank you.

- Richard


On Thursday, 23 July 2020 15:57:29 UTC+1, Gavin Andrews wrote:
>
> Are the tubes muxed?  I have an interrupt scheme which muxes the tubes and 
> for each set the ontime is set within the mux cycle to allow fading of 
> digits.
>
> I did implement cross fade but don't like the effect to be honest so have 
> disabled it... one effect I really do like is when it reaches 0 (after 9) 
> it scrolls back to 0.... 9,8,7...0 
>
> On Thu, Jul 23, 2020 at 2:58 PM Paul Andrews <[email protected] 
> <javascript:>> wrote:
>
>> Not sure what happened to the truth table there. So here it is again 
>> (fingers crossed)
>>
>> [image: 20200723_133355000_iOS.jpg]
>>
>>
>> On Thursday, July 23, 2020 at 9:57:21 AM UTC-4, Paul Andrews wrote:
>>>
>>> This chip works as follows: You stream data in to the shift register. On 
>>> the rising edge of the LE pin, the data is transferred from the shift 
>>> register to the outputs. If the LE pin is left high, the chip is in 
>>> transparent latch mode - which means that any data shifted to it is 
>>> immediately visible.
>>>
>>> This is the truth table from the datasheet that shows this:
>>>
>>> [image: 20200723_133355000_iOS.jpg]
>>> So, in other words, you should really leave the LE pin low and then 
>>> toggle it after you have written the data as follows:
>>>
>>> SPI.write32(nixData);
>>> SPI.write32(nixData >> 32);
>>> digitalWrite(SS, HIGH);
>>> digitalWrite(SS, LOW);
>>>
>>> The code below works, but it leaves the chip in transparent latch mode. 
>>> This is a hang-over from the code samples for using the 74HC595 chip.
>>>
>>> On Thursday, July 23, 2020 at 6:17:48 AM UTC-4, Christian Riise Wagner 
>>> wrote:
>>>>
>>>> Richard, I'm using the 32-bit SPI-write for my most recent ESP32 based 
>>>> clock. I'm saving the data for all six tubes and the colons in a single 
>>>> 64-bit variable (uint64_t), so sending out the data can be done with just 
>>>> four lines of code:
>>>>
>>>> digitalWrite(SS, LOW);
>>>> SPI.write32(nixData);
>>>> SPI.write32(nixData >> 32);
>>>> digitalWrite(SS, HIGH);
>>>>
>>>> No special setup is required to use the 32-bit SPI functions. As for 
>>>> the pins, looking at the ESP32 Arduino GitHub 
>>>> <https://github.com/espressif/arduino-esp32/blob/master/libraries/SPI/src/SPI.cpp>,
>>>>  
>>>> the SPI begin function takes four variables for the pins:
>>>>
>>>> void SPIClass::begin(int8_t sck, int8_t miso, int8_t mosi, int8_t ss)
>>>>
>>>> If the function is called with empty brackets, the default pins will be 
>>>> used. Has to be said that my design uses the default pins, so I haven't 
>>>> tested this.
>>>>
>>>>
>>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "neonixie-l" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web, visit 
>> https://groups.google.com/d/msgid/neonixie-l/ebd009e6-6d49-4e92-8cff-2281f24ae492o%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/neonixie-l/ebd009e6-6d49-4e92-8cff-2281f24ae492o%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"neonixie-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/neonixie-l/c121e7fd-0b0a-4030-8653-b437e5d2c8f6o%40googlegroups.com.

Reply via email to