CANxtra support thread

Thanks Gus, found the 4’th bit and updated the code.

Hi. Can you please tell me if the following code correct to use IO26 on the CANxtra?

OutputPort myPort;
myPort= new OutputPort(EMX.Pin.IO26, true);
while (true)

All I’m trying to do is set the output of the pin to true. As I understand it, once it is set, pin 11 (on the DB25) should then be set high (with pin 7 on the DB25 being ground). Currently, this is not the case. It is not going high for me.

Also, are there other pins on the CANxtra that can be used for General IO pins by disabling board functionality such as COM1, COM2, CAN1, CAN2? Any others? What code do I need to use to free up these IO pins. I’m coming from the EMX board which has plenty of free General IOs for me to this CANxtra that seems to only have 1 or 2 general IOs and I’m a bit lost as to what I need to do to free up some extra General IOs

Thank you for your help.

I am counting 15 or more IOs that are multiplexed with other peripherals.

Yes your code should set the pin high. Although, you keep setting it high in a loop every 200ms!

Try another IO and see if you can control it.

Also, how do you know it is not high? What are you seeing on the pin?

Thank you. I was actually referencing the brochure when I asked my question. :slight_smile: I’ve tried to do my homework on this one. I am checking the high low with an oscilloscope and tried verifying with an LED and a resistor. I do not appear to be able to set any bit.

You mentioned 15 IO’s multiplexed with other peripherals. I saw these (the COM1, COM2, CAN1, CAN2, etc…). However, don’t I need to somehow disable these peripherals before the IO’s can be used for General IO?

No need to disable, it is automatic.

If none of the pins work then I am guessing you are counting the pins wrong? The schematic may help.

Hmmm. I do understand how you came to this conclusion, but something else must be wrong. For example, I tried setting IO4 and IO8 both to high and then both to low. This had no effect on voltage at the center two pins of the 10 pin connector coming off the board. I chose these pins to eleminate any question as to my counting.

What I mean is that it is probably not likely that all pins are not working. If only one of them didn’t work then we can assume other things and dig into it further.

Gus, I count 14 IO pins. Are you also counting the led pin? As that isn’t on the DB25 connector… :slight_smile:


Does the CANxtra support RLP? I read the comparison of the EMX and EM and it indicated that the EMX does support RLP and seemed to imply that the EM does not. But, that document looks pretty old and RLP support has been added for the Panda, so I would expect that CANxtra would have it.

Also how many of these devices do you have available, i.e. <10, >50?

No RLP but beside that, all is supported IIRC.

For quantity on hand, if you have serious inquiry then please call/email GHI directly and we can help you further. GHI may even give further discounts.

Another question. The catalog page says no future support. Does that mean that with next release of EMX firmware all support will be removed for the CANxtra?

Or, does it mean that you are not planning on supporting the CANxtra anymore, but you are also not going to remove the existing functionality and since the EM and EMX are very similar new versions of the firmware will have CANxtra support. For instance v4.2 of NETM is coming out in a few months, will CANxtra be able to use it?

All said is correct, as for NETMF 4.2, it will be optional to GHI to include CANxra support or not…or partial support. I would think it will be in NETMF 4.2 but this is not guaranteed. If you have commercial needs for few CANxtra on hand then you can always contact GHI and express your needs.

I can’t seem to find the datasheet for the Embedded Master module on the website. Does any one know the output current capacity of the IO pins? I was also wondering which ones were interrupt pins, but I figured they probably matched up to the EMX interrupt pins.

4ma is guranteed at voltage levels with higher current at a voltage drop. See lpc2468 datasheet for details.

Yes pins should be near identical to emx

Now that I’ve had a chance to get my previous programs running on the CANxtra, I’m trying to branch out into things I can’t do with my Panda. I’m trying to get networking figured out, and I have no issues when I manually renew a DHCP address with the network cable plugged in at startup. I can communicate with servers and update the system time, which is great. But I can’t get the “NetworkChange” events to fire, so I can’t have it renew the IP Address when the physical connection is plugged in, nor can I start and stop work based on the IP Address being set. Do I need to do something more than subscribe to the “NetworkChange.NetworkAvailabilityChanged” and “NetworkChange.NetworkAddressChange” events?

This is not supported.

This should work fine.

You can also poll the Ethernet cable status using another thread.


Thanks Joe. The NetworkAvailabilityChanged event still isn’t firing for me, but monitoring Ethernet.IsCableConnected in another thread is doing the trick nicely.

To be honest, I wasn’t sure if the Ethernet class applied only to the Wiznet chip, or to any GHI Ethernet interface. Thanks for clarifying!

This is Wiznet library documentation. This is separated now from GHI’s libraries

Can someone provide me with a small code sample on how the display of the CANxtra works?

It is standard graphics support just like FEZ Cobra, even WPF will work!