DL40 - Raise Interrupts from the module

I have a custom DL40 firmware running based on the original firmware, and everything seems to be working. I can read/write the registers just fine, what I am not able to do is raise an interrupt that the mainboard will pick-up.

The information is quite spares at the moment, so I have basically being trying to build an understanding of Daisylink from the code and what information is available in the Module Builders guide.

  1. Is my assumption correct that the DL_Interrupt() function in DaisyLink.c should raise an interrupt on the mainboard?
  2. Is there anything extra I need to be doing to raise interrupts from the module?
  3. Do interrupts on Generic DaisyLink work? Since it is not directly exposed, the event if protected.

I can see the interrupt bit (0x80) of the Config register goes high, but I do not get the interrupt event on the .NET side. I have brought the GenericDaisylink.cs code straight into my project so that I can attach to the interrupt.

Good question. IIRC, DL support this feature through one of the control pins but this is a feature we never used before so it is possible that it is left out or not working properly. We will add this to the to do list and look into at soon.

@ Gus - Thank you for the prompt reply. My understanding of the protocol from the Module Builders guide is that this should work, I delve deeper into the code to try better understand how it might be implemented.

Is there a more detailed protocol reference other than the information in the Module Builders guide? Maybe a reference implementation from MS?

Chris,

I have implemented DL on avr chip. I had initial post on my blog.

Let me know if you have questions.

@ Architect - I will definitely take a look at that, thank you!

Just to let you all know, the interrupt implementation on the DL40 is working perfectly!

Great! So what does your DL module do?

Would be nice if someone of the experts could implemtent an I2C-Slave function with the DL-40 module.

Right now it flashes the on board LED and raises Interrupts every time the LED is on.

What I am hoping to do is off load the work of reading sensor data. Basically the module will read and cache the data until it has exceeded a certain number of readings at which point the module raises an interrupt, the mainboard reacts to the interrupt and reads the buffered data.

Why am I doing this? Purely for fun, I decided I wanted to learn about how the DL40 works and I made up this project. If/when I get it working I will of course post the code.

1 Like

Looking forward to the code – I purchased one as well for a similar purpose.

What exactly are you looking for?

@ Architect - I’m just wasting my time with a curios project where I try to retrieve the messages which are sent from a device via I2C and PCF8574 port extender to a HD44780 LCD display to generate a protocol file of the messages. I’ve realized this sniffing on the I2C -bus with two PCF8574 which generate an interrupt to my spider which then reads the bytes over the spiders I2C bus. My solution works but it would be more elgant - and without soldering - to use a DL40 module since its controller has an I2C-Slave function and it could write the incoming data in a buffer from where it could be fetched without speed problems from the spider. Do you know a better solution?