Jump to content
  • 0

Uart Python SDK Example DD


Alejandro-Dev

Question

I am trying to run the python UART example on a DD with a loopback between pins 24 and 25. I am using almost the same code from the example except that I am opening the first available device instead of the AD with configuration.

print("Opening first device")
dwf.FDwfDeviceOpen(c_int(-1), byref(hdwf))
# device configuration of index 3 (4th) for Analog Discovery has 16kS digital-in/out buffer
# dwf.FDwfDeviceConfigOpen(c_int(-1), c_int(0), byref(hdwf)) 

Are the DIO for pins 24 and 25 selected correctly? I am doing the following as in the example:

dwf.FDwfDigitalUartTxSet(hdwf, c_int(0)) # TX = DIO-0
dwf.FDwfDigitalUartRxSet(hdwf, c_int(1)) # RX = DIO-1

I am not getting any readings on the terminal though. Are there any obvious reasons? Am I missing something?

Opening first device
Configuring UART...
Sending on TX for 10 seconds...
Receiving on RX...

Thanks,

Alejandro

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...