How to sort tabularx enteries in Latex? - sorting

I have a tabularx in my file like this:
\begin{tabularx}{\linewidth}{c p{0.5cm} Y}
RFID & & Radio Frequency ID\cr
WSN & & Wireless Sensor Network\cr
IoT & & Internet of Things\cr
SN & & Sensor Network\cr
IEEE & & Institute of Electrical and Electronics Engineers
\end{tabularx}
I would like to know if there is any command that sorts the output of the tabularx in pdf, alphabetically, to get an output like:
List of Acronyms:
IEEE Institute of Electrical and Electronics Engineers
IoT Internet of Things
RFID Radio Frequency ID
SN Sensor Network
WSN Wireless Sensor Network

Instead if reinventing the wheel, I suggest to use one of the existing package to create lists of acronyms. One example:
\documentclass{book}
\usepackage[]{glossaries}
\makeglossaries
\newacronym{RFID}{RFID}{Radio Frequency ID}
\newacronym{WSN}{WSN}{Wireless Sensor Network}
\newacronym{IoT}{IoT}{Internet of Things}
\newacronym{SN}{SN}{Sensor Network}
\newacronym{IEEE}{IEEE}{Institute of Electrical and Electronics Engineers}
\begin{document}
\glsaddall
\printglossary[title={List of Acronyms},nonumberlist]
\end{document}
(to be compiled with pdflatex filename ; makeglossaries filename ; pdflatex filename)

Related

micropython ds18x20 wrong rom/address/serial

I have ESP23 dev kit with micropython firmware esp32-idf3-20200329-v1.12-317-g688323307.
I also have ds18b20 waterproof sensor. datasheet link
I wrote this code for it:
import time, onewire, ds18x20
import machine
from machine import Pin
ds_pin=Pin(19)
ds_sensor = ds18x20.DS18X20(onewire.OneWire(ds_pin))
roms = ds_sensor.scan()
for rom in roms:
print(rom)
It returns tis info:
[bytearray(b'(\xbcN6\x14\x19\x01\xba')]
Before reading temp data from sensor, we first need to use the scan() function to scan for DS18B20 sensors. The addresses found are saved on the roms variable (the roms variable is of type list). scan() function sends request and sensor returns its unique 64-bit serial code.
I used manual here
Today I bought two more ds18x20 waterproof sensors (I don’t know what type of sensor - ds18a20/ds18b20 or else - are they, ‘cause eager chinese manufacturers sealed sensors inside metal bullet too good, so I can’t just look inside).
I tried to run the same code with them, but it returned the following:
bytearray(b'(\xff\xff\xff\xff\xff\xff\xff')
bytearray(b'(\xfe\xff\xff\xff\xff\xff\xff')
bytearray(b'(\xfc\xff\xff\xff\xff\xff\xff')
bytearray(b'(\xf8\xff\xff\xff\xff\xff\xff')
bytearray(b'(\xf0\xff\xff\xff\xff\xff\xff')
bytearray(b'(\xd0\xff\xff\xff\xff\xff\xff')
bytearray(b'(\x90\xff\xff\xff\xff\xff\xff')
bytearray(b'(\x90\xfe\xff\xff\xff\xff\xff')
bytearray(b'(\x90\xf6\xff\xff\xff\xff\xff')
bytearray(b'(\x90\xe6\xff\xff\xff\xff\xff')
bytearray(b'(\x90\xc6\xff\xff\xff\xff\xff')
bytearray(b'(\x90\x86\xff\xff\xff\xff\xff')
bytearray(b'(\x90\x86\xfd\xff\xff\xff\xff')
bytearray(b'(\x90\x86\xf9\xff\xff\xff\xff')
bytearray(b'(\x90\x86y\xff\xff\xff\xff')
bytearray(b'(\x90\x86y\xfe\xff\xff\xff')
bytearray(b'(\x90\x86y\xfa\xff\xff\xff')
bytearray(b'(\x90\x86y\xf2\xff\xff\xff')
bytearray(b'(\x90\x86y\xe2\xff\xff\xff')
bytearray(b'(\x90\x86y\xa2\xff\xff\xff')
bytearray(b'(\x90\x86y\xa2\xfd\xff\xff')
bytearray(b'(\x90\x86y\xa2\xf9\xff\xff')
bytearray(b'(\x90\x86y\xa2\xf1\xff\xff')
bytearray(b'(\x90\x86y\xa2\xe1\xff\xff')
bytearray(b'(\x90\x86y\xa2\xc1\xff\xff')
bytearray(b'(\x90\x86y\xa2\x81\xff\xff')
bytearray(b'(\x90\x86y\xa2\x01\xff\xff')
bytearray(b'(\x90\x86y\xa2\x01\xfb\xff')
bytearray(b'(\x90\x86y\xa2\x01\xf3\xff')
bytearray(b'(\x90\x86y\xa2\x01\xe3\xff')
bytearray(b'(\x90\x86y\xa2\x01\xc3\xff')
bytearray(b'(\x90\x86y\xa2\x01\x83\xff')
bytearray(b'(\x90\x86y\xa2\x01\x03\xff')
bytearray(b'(\x90\x86y\xa2\x01\x03\xfe')
bytearray(b'(\x90\x86y\xa2\x01\x03\xfc')
bytearray(b'(\x90\x86y\xa2\x01\x03\xdc')
bytearray(b'(\x90\x86y\xa2\x01\x03\\')
When I try to read temperature using this values it returns ‘CRC error’.
What can be done? Is the problem with code, or the sensors are failed somehow?
Connect one sensor at a time when you do the scan.
You haven't shared how you're wired the DS18x20 sensor. Make sure its positive power connection is to 3.3V not 5V.
Make sure you've connected a resistor (4.7K should be good) between the data pin of the sensor and 3.3V. OneWire devices absolutely won't work reliably without this resistor - you might see the kind of problem you're seeing.
If you're sure it's wired correctly the next step would be to try it with different firmware, for instance a Dallas one-wire scanner using the Arduino Core. That would eliminate the possibility of problems with the library you're using and MicroPython.
looks like fake sensor
How to tell original from fake DS18B20 temperature sensors
Looks like i'm a fool))
Yes. One 4.7K pull up resistor and it's alive! IT'S ALIVE!!
aaaand whats'up doc?
then we use internal PULL_UP mode we pull up signal only for ESP.
BUT! DS18B20 is microchip too. And the wire for little DS18B20 is like giant radio aerial.
Maybe in my first sensor this problem was solved on hard level.

SMBus Address and BaudRate

I need to communicate with some batteries ( BT-70791CK from BrenTronics). They use SMBus ver 1.1 for communication, but in datasheet of the batteries there is no information about the SMBus address they have or the baudrate. I asked them and they told me that this is the only document that they have. So I started to think that maybe I do not need to know SMBus addresses or baudrate for SMBus communication. My questions are
Can I still communicate with devices that use SMBus ver 1.1. without knowing their addresses or baudrates?
Is there any specific baudrate or SMBus address for batteries or for SMBus ver1.1?
In Case you or others are looking for these answers I will post a few links and a short description regarding the Smart Battery Data Specification v1.1 and System Management Bus (SMBus) v1.1.
Battery Address (Bren Tronics == 0x16) -> LinkMissing || I have seen a sheet with standard addresses for charger, battery, and other devices, but I can't seem to find it. Feel free to comment the link in YOU know where to find this and I will add it to the link above.
Smart Battery Data -> Here || This contains all the values/codes you can read/write to a smart battery that complies with SMBus v1.1. It also contains a small introduction on how you read / write to the battery, SMBus functions like Read Block or Read Word. To save some time, pay attention to the exceptions on how you read data from the Battery. almost all "codes" allows you to read a value from 2 bytes + CRC8 (3 bytes total, if your software will utilize a CRC8 check)
SMBus v1.1 -> Here || Smart battery data will show battery related operations, but it uses SMBus (Very close to I2C, but some important differences!) To implement Smart Battery Functions, you will need to understand SMBus and how I2C works.
I2C -> Here || Have a question about I2C? I strongly recommend this web page.
Bren Tronics Implementing the SMBus -> Here || This contains the most common mistakes when implementing SMBus. pay close attention to the maximum distance from master->slave without repeaters or other more clever ways to provide pull-up Voltage.
If any link is broken or for some reason the specification sheets is taken down from the "WWW". Tag me in the post, I do have the PDF-files stored offline.
If you need to find addresses on I2C, the RaspberryPI 3b+ has I2C GPIO.
As long as you have the correct pull-up resistance, you can do like I have, and find the battery address using RPI.
Another thread on RaspberryPI + i2cDetect("AddressFinder") -> Here

How can I use HPS pins of altera FPGA development board?

How can I design my own MAC layer function to access Ethernet chip instead of using altera IP function. My board is DE1-SoC with cyclone V 5CSEMA5F31C6 chip. The pins to access Ethernet chip are made to be HPS pins which I can't assign my own signals to.
It is possible for Cyclone V as well. I have my own Ethernet IP working on the fpga side in a DE1-SOC board using the HPS pins. I used them through the pin multiplexing feature of the hps component. You have to configure them and make the hps boot the preloader code for that configuration. However, you cannot use the DDR feature (consequently you cannot achieve 1Gbps) in the cyclone v (Altera said that).
For the process, you should set the pin multiplexing, generate Qsys and compile Quartus. This process creates the folder spl_bsp. Then you have to create a SD card with the image provided by Altera (the image contains all the partition requiered). After this you are able to make the preloader:
1) bsp-generate-files.exe --settings ./software/spl_bsp/settings.bsp --bsp-dir ./hps_isw_handoff/soc_system_hps_0
2) cd software/spl_bsp/
3) make
4) make uboot
5) alt-boot-disk-util.exe -p preloader-mkpimage.bin -a write -d e // e is the drive of the SD card
6) cp uboot-socfpga/u-boot.img /cygdrive/e
Finally, put the SD card in the fpga kit and programm the FPGA. The HPS boots from the SD card and the pin multiplexing matrix configures the pins for output.
This is possible on the new Arria 10 SoC, but not in Cyclone V. Arria 10 has shared I/Os that are configurable to the HPS or the FPGA.

Test COM port LED custmer display using windows cmd

I buy customer display that customer display has PL-2303HXD chip. The customer display connect to COM1 to my PC.I can send any number using test software come with that customer display. but I can't display any value using cmd in windows.
In the manual ask to try
C: \> MODE COM1 2400, N, 8,1
C: \> TYPE CON> COM1
in cmd but that not work for me. please tell how can i test customer display using cmd in windows.
Instructions for application:
Use the standard RS232 serial port (baud rate= 2400, parity =none, data bits = 8, stop
bit = 1).
Use international ESC / POS Common set of commands, do not need to install any drivers. Both under DOS or WINDOWS platform, just follow the format of the commandset to send data to the serial port to display the content, without handshake.

Spartan 3ADSP device DNA read via JTAG

how to read device DNA for Spartan 3A DSP via JTAG cable using iMPACT tool ? and if any other methods available to cross check the code readead deviceDNA value, whether it is correct deviceDNA value of that device OR not?
There is a Xilinx AR for this:
AR# 40856 iMPACT- How can I read DNA from my FPGA with IMPACT?
For Spartan-3A series devices (Spartan-3A, Spartan-3AN
andSpartan-3ANDSP)
To read if the DNA iMPACT batch mode command is available. ("readDna -p <position>") How to get the Xilinx Device DNA via iMPACT
batch mode?
1. Generate iMPACT batch mode file say ".cmd" (in any ASCII text Editor) with following text commands in it. You can run this in
iMPACT batch mode. In the commands below, "X" denotes the position of
the targeted device.
setMode -bs
setCable -port auto
Identify
identifyMPM
Readdna -p X
exit
2.Run above generated file "readDNA.cmd" (ASCII text file) in IMPACT batch mode command line as:
Impact -batch <filename>.cmd
The above command will display the DNA number on the DOS command console.
Note: If FPGA is configured prior to read Device DNA via JTAG port then the value will be wrong. Please make sure that FPGA is not
configured from external Flash or JTAG device. To achieve this simply
change mode pins or erase the external Flash deviceand powercycle the
board.

Resources