I2c external hardware



  • Re: i2c and external hardware

    Hi. We have a simple hardware module (single PCB with a few buttons and things + an i2c interface). We want to use our PCB to send and receive G-code commands and data to and from a Duet board.

    We don't want to do anything too complicated -- just move a few motors and read some basic status info from the Duet. Is this capability already implemented in the Duet firmware, and thus a simple exercise to get working, or do we need to modify firmware and ugly things like that?

    Ideally I would like to simply plug in our PCB and have full G-code command capability. Here's hoping.....

    Thanks in advance,

    Rob



  • As an alternative, I could use the 2-wire async port (URXD0, UTXD0) that is designed to connect to the PanelDue touchscreen...

    https://duet3d.dozuki.com/Wiki/Connecting_an_LCD_control_panel#Section_Connecting_a_PanelDue

    Does this serial port use pure G-code or is there some other protocol being used to communicate? I'm thinking that we could plug our module onto that 4-wire (incl. power) port and use pure G-code to do everything.


  • administrators

    The PanelDue port accepts GCodes. By default it requires received GCodes to have line numbers and checksums, but this can be changed using the M575 command in config.g. The signal levels are 3.3V.

    There is currently no support in the firmware for receiving GCodes over I2C.



  • Thanks dc42 ! The PanelDue seems to be the best option then.

    Are you able to point me to any documentation relating to the PanelDue hardware interface and serial comms? Is it simply an async SCI port on the SAM uController? Will I need to use the ribbon cable box-header?

    Sorry, I am new to the Duet devices, so not quite sure where to start.

    Thanks in advance.


  • administrators

    Yes it's just serial async with 3.3V signals levels. You can use either the 10-way box connector or the 4-way PanelDue connector. You can get 5V power form the same connector, if your board needs 5V and not too much current. If your board is 5V then don't forget to level-shift the TxD pin from your board down to 3.3V before feeding it into the URxD pin on the Duet.



  • @dc42 Perfect -- I will place an order for one ASAP. Does documentation for the async bit rates and G-code commands come with the Duet PCB?


  • administrators

    @robocop check out the M575 command:

    https://duet3d.dozuki.com/Wiki/Gcode#Section_M575_Set_serial_comms_parameters

    You can set the baud rate for the serial comms and send any gcode that the Duet supports over that serial link (the page I linked to has all of them!)



  • @robocop Please post when you have the module. I have some similar in the todo list, maybe using a esp8266 and the 4x4 key pad for arduino.


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.