Where can I find address of I/P and O/P ports of my design so that I can use those addresses for giving I/P to PYNQ Z2 board through JUPYTER notebook? - jupyter-notebook

Need to know address of input and output pins so they can be used for giving inputs to PYNQ Z2 board through JUPYTER note book
I don't have any idea to find address.

Related

How to convert between 1200 and 1200/75 baud devices? socat?

Is it possible to get a program that uses symmetrical 1200 baud to communicate over serial to a device running at 1200/75? I've tried putting socet in between to create a virtual serial device running at 1200 and set the USB serial to 1200/75 but the far end still gets garbled text:
socat -d -d pty,link=/dev/ttyvirt,raw,nonblock,echo=0,perm=0777,b1200 open:/dev/ttyUSB0,raw,nonblock,echo=0,ospeed=b1200,ispeed=b75
The ispeed and ospeed options take integer numbers as argument, so try without the 'b' prefixes!

data sending from jetson to arduino

It was successful to train from jet son-XAVIER and recognize it as cam. But I don't know how to send the information that jet son-XAVIER recognized in real time to Arduino. The objects we recognize are elk and wild boar. I know that I can only send 1 letter through communication, so elk will send e and wild boar to w. Is there a way to send it as soon as it recognizes it through real-time web cam?
There's not a lot of information here on your setup, but here's a possible solution:
I see the NVIDIA Jetson AGX Xavier module has USB-C ports.
Buy a USB-A to USB-C cable, and plug the Arduino directly in.
I'm not sure what program/language you're using with your trained model, but I'll guess that it's python for now.
You'll want to open a Serial connection to the arduino, and you can do this with pyserial:
https://pypi.org/project/pyserial/
You can send more than just one letter, you can send entire data streams. But, if you want to just send one letter, it will do that as well.
Here's the official documentation for how to communicate with an Arduino using Python:
https://create.arduino.cc/projecthub/ansh2919/serial-communication-between-python-and-arduino-e7cce0
If you're not using python, specify your language of choice, and we can look up and see if it has a serial library.
I have never used darknet but may be this can point you in the right direction.
I have used the library sugested by Bucky and I believe you could add the serial comunication to darknet.py. This is what I would do:
#Add this import at begining of the file darknet.py
import serial
#########################################################
#this is a mocked version of detect in darknet.py, assuming that the labels you used are "elk" and "wildboard". You should not add this lines to the file.
def detect():
res = []
res.append(("elk",0.98,(2,2,50,50)))
res.append(("wildboard",0.98,(2,2,50,50)))
return res
r = detect()
##########################################################
#Add this after the 'print r' at the end of the file darknet.py
ser = serial.Serial('/dev/ttyUSB0') # open serial port. You should check what serial port is assigned to your arduino.
for obj in r:
if obj[0]=="elk" and obj[1]>=0.9: #assuming 0.9 as the minimum confident for a detection
print "found elk"
ser.write('e') # you can send a string with just one letter
elif obj[0]=="wildboard" and obj[1]>=0.9:
print "found wildboard";
ser.write('w') # you can send a string with just one letter
ser.close() # close port

Where can i get am335x microcontroller board registers header file?

Hi i was previously using the atmel at91 microcontroller and for all the register values i was refering the foolowing header files Linux/atmel_serial.h and linux/atmel_pdc.h.
Now i have shifted to an Texas Instruments devgeloper board which is using am335x processor so i want to know where i can find the same relavent files for this instrument.
The list of registers that i am using in my code when i was working on the atmel board was
ATMEL_PDC_RPR
ATMEL_PDC_RCR
ATMEL_PDC_TPR
ATMEL_PDC_TCR
ATMEL_PDC_TNPR
ATMEL_PDC_TNCR
ATMEL_PDC_PTCR
ATMEL_PDC_TXTEN
ATMEL_US_CR
ATMEL_US_TXEN
ATMEL_US_RXDIS
ATMEL_US_IER
ATMEL_US_TXEMPTY
ATMEL_US_RXRDY
ATMEL_PDC_RXTEN
ATMEL_US_RTOR
ATMEL_US_TIMEOUT
ATMEL_US_OVRE
ATMEL_US_FRAME
ATMEL_US_PARE
ATMEL_US_RSTSTA
ATMEL_PDC_RXTDIS
ATMEL_US_RETTO
ATMEL_US_STTTO
ATMEL_US_CSR
ATMEL_US_IDR
ATMEL_US_TXDIS
ATMEL_US_RXEN
ATMEL_PDC_TXTDIS
ATMEL_US_MR
ATMEL_US_USCLKS
ATMEL_US_CHRL
ATMEL_US_NBSTOP
ATMEL_US_PAR
ATMEL_US_USCLKS_MCK_DIV8
ATMEL_US_CHRL_8
ATMEL_US_NBSTOP_1
ATMEL_US_PAR_NONE
ATMEL_US_IMR
ATMEL_US_BRGR
ATMEL_PDC_RNPR
ATMEL_PDC_RNCR
ATMEL_US_RSTRX
ATMEL_US_RSTTX
PDC_RX_TIMEOUT
ATMEL_US_USMODE_RS485
ATMEL_US_TXRDY
I need the equivalent for the TI am335x development board.Thanks
please refer to the device datasheet for device registers:
http://www.ti.com/litv/pdf/spruh73i
In Linux each device driver has it's own internal definitions of registers for which it has appropriate access rights. There is no unique place which defines all peripheral registers like Atmel does.

Spartan 3 Starter Kit Constraints File

I am not sure if this is the right stack exchange website to post this on, but if it isn't please move it to the appropriate one.
I am facing a small problem in writing my constraints file for the spartan 3 starter kit.
I have read the documentation provided by Xilinx (the manufacturer) and ive been searching online for a few weeks without any luck.
What i am trying to do is link my Netlist interface to any of the 3 40-pin-headers on the board. (See image below)
Usually its very simple, if say i want to interface a button or a led on the board, i just read the connection name on the board, for example one of the buttons is M13 and write in the UCF file something like this :
NET "BTN0" LOC = "M13";
As you can see on the image the headers are named A1, A2 and B1 on the board, but oddly enough, none of the following worked :
NET "TestOutputLine" LOC = "A1(0)"; -- The (0) is to reference a single line on an array
NET "TestOutputBus" LOC = "A1"; -- The bus is of equal dimension of A1 (which is 40)
The errors i got meant that either the target (specified by LOC) does not exist or that the assignment is invalid.
I hope you have some ideas for me.
Thanks in advance
EDIT :
Here is the output from ISE :
ConstraintSystem:59 - Constraint <NET "TestOutputBus" LOC = "A1";>
[circuit.ucf(12)]: NET "TestOutputBus" not found. Please verify that:
1. The specified design element actually exists in the original design.
But i am pretty sure that TestOutputBus exists, as a matter of fact there is nothing else in my design right now, and the correct top level unit is being used.
EDIT2 :
I updated my UCF file, right now it's like this :
NET "TestOutputBus(0)" LOC = "A1(0)";
NET "TestOutputBus(1)" LOC = "A1(1)";
But i get a different error now in mapping :
MapLib:30 - LOC constraint A1:0 on TestOutputBus<0> is invalid: No such
site on the device. To bypass this error set the environment variable
'XIL_MAP_LOCWARN'.
MapLib:30 - LOC constraint A1:1 on TestOutputBus<1> is invalid: No such
site on the device. To bypass this error set the environment variable
'XIL_MAP_LOCWARN'.
Solution :
In order to get the pins 5 and 6 mapped to TestOutputBus(0) and TestOutputBus(1) respectively what i had to use was this :
NET "TestOutputBus(0)" LOC = "N7"; -- A1 pin 5
NET "TestOutputBus(1)" LOC = "L5"; -- A1 pin 6
Note that pins 0 are not mappable thats why i used pins 5 and 6, here are the tables that show the mappable pins for all headers and their LOCs.
As it turns out, there is an address for each usable pin of each header of the FPGA.
The datasheet (http://forums.xilinx.com/xlnx/attachments/xlnx/Spartan/3411/1/S3BOARD_RM.pdf) was helpful especially pages 49 - 51
I copied this from my earlier comment to your question so it would be an actual answer and not just a comment.
You should have LOC constraints in your UCF file for every port on your top-level module. So if you have a 40-bit-wide bus as an input or output at the top level then you should also have 40 separate LOC constraints in your UCF file to make sure that the logical bus in your top-level schematic actually gets mapped to the correct pins on your FPGA. If you are only using two pins, then you can declare the bus to be 2-bits wide and use 2 LOC constraints. The FPGA will treat all unused pins as inputs and ignore them.
I once got the original ConstraintSystem:59 net xyz not found error when i accidentally selected one of my modules as a top module. The pins declared in UCF could not be found in the port declaration of wrong module.
Also i get this error when i have some pin declared in UCF but ommit it in port declaration of top module.

How to get the SIM number (ICCID) of a modem using AT commands

I'm trying to get the SIM number (ICCID, not IMSI) of my 3G Huawei E5830 modem using AT commands (also called Hayes command set).
Unfortunately, it's not specified in the modem formal documentation.
for sim900 AT+CCID
gives CCID.
e.g.89912200000280775659
The first two digits (89 in the example) refers to the Telecom Id.
The next two digits (91 in the example) refers to the country code (91-India).
The next two digits (22 in the example(MNC of IDEA)) refers to the network code.
Try "AT^ICCID?". tested on Huawei E173.
It works with AT+CRSM and also AT+CSIM.
AT+ICCID on galaxy S4 in modem mode.
AT+CICCID on an Iridium satellite modem.

Resources