Welcome! Log In Create A New Profile

Advanced

MELZI Marlin pins

Posted by nophead 
MELZI Marlin pins
July 05, 2012 11:06AM
The version of Marlin I got from Github had SDSS on pin 24 for Melzi. When I enabled the SDSUPPORT it did not work and it corrupted the thermistor input on A7. Looking here [sanguino.cc] it seems the digital pin numbering is reversed on the A port, so it should actually be pin 31. Changing it made the SDCARD work.

Similarly LED_PIN was set to 28 but it should actually be 27. However when I changed this the LED does nothing, so I searched for LED_PIN in the source code and it appears that it is never used.

What do reprap firmwares normally do with the LED?


[www.hydraraptor.blogspot.com]
Re: MELZI Marlin pins
July 06, 2012 05:54AM
Quote

What do reprap firmwares normally do with the LED?

Nothing. As you found out smiling smiley

In earlier days the LED was used to give some user feedback like "look, it does something!". Teacup turns it on early in the step interrupt routine and turns it off as the step is done. So the brightness of the LED gives you an idea of the percentage of CPU cycles required for the step interrupt. Not really useful, though.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: MELZI Marlin pins
July 23, 2012 08:49AM
I have a strange problem with the FAN_PIN:

If I define it as 4 the fan can be controlled with M106/M107 but the bed temperature stops reading correctly. It starts to track the extruder temperature but not quite the same value.

If I define FAN_PIN as -1 then the bed temperature reads correctly but the fan defaults to on, presumably it is an input. I can control it then with M42 P4 Sxx and it works correctly without affecting the bed temperature reading (apart from the fact it blows on the bed and cools it).

If I load the same code into a Sanguinololu then having FAN_PIN defined to 4 still corrupts the bed temperature, so it isn't a hardware fault on the Melzi. (4 is an pin on the extension header on Sanguinololu).

If I look for where FAN_PIN is used in the firmware I can't see anything that would cause this effect, especially as M42 does pretty much the same.

Does anybody have Marlin working with a fan on Melzi or Sanguninololu?


[www.hydraraptor.blogspot.com]
Re: MELZI Marlin pins
July 23, 2012 10:20AM
If I comment out #define FAST_PWM_FAN it works, so a side effect of changing the PWM frequency with setPwmFrequency() seems to be to mess up the ADC reads.


[www.hydraraptor.blogspot.com]
Sorry, only registered users may post in this forum.

Click here to login