Welcome! Log In Create A New Profile

Advanced

Serial com.

Posted by fma 
fma
Serial com.
September 18, 2013 03:55AM
I have a lot of problems with USB com with my Azteeg X3 running Repetier firmware. The X3 has a serial port connector I would like to use to connect to a real RS232 port on my computer (using a TTL converter).

I don't know yet if this serial port is wired to the same ATMega serial port as internal FTDI... If it is not the case, is there a way to use another serial port in the firmware? Can you point me where to make changes?

If I use such serial connection, do I loose some features from Repetier host?

Thanks,


Frédéric
Re: Serial com.
September 19, 2013 09:37AM
If you check HAL.cpp in the development tree you see
#if defined(UBRRH) && defined(UBRRL)
RFHardwareSerial RFSerial(&rx_buffer, &tx_buffer, &UBRRH, &UBRRL, &UCSRA, &UCSRB, &UDR, RXEN, TXEN, RXCIE, UDRIE, U2X);
#elif defined(UBRR0H) && defined(UBRR0L)
RFHardwareSerial RFSerial(&rx_buffer, &tx_buffer, &UBRR0H, &UBRR0L, &UCSR0A, &UCSR0B, &UDR0, RXEN0, TXEN0, RXCIE0, UDRIE0, U2X0);

which initializes the serial connection. It is hardwired to use RX0/TX0. I do not know if the serial Port connector uses a different serial interface, but I would guess so. So you need to find out which and change the registers to use that port. If it is a mega compatible, which I think it is, you need to change the second version and replace the 0 with 1-4 depending on the connection you use.

Function will be completele identical, but you will lose the reset on connect capability you have over usb.


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
fma
Re: Serial com.
September 19, 2013 09:49AM
That's a nice code! Easy to customize... I love that smiling smiley

I'll let you know whow it works...

Thanks for your answer!


Frédéric
Sorry, only registered users may post in this forum.

Click here to login