Download Command 0x17 - Tech: Each position defines the Uart assignment

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Download Command 0x17 - Tech: Each position defines the Uart assignment

'Neal Singh
Administrator
Each of the Serial Ports would need a Code to define the Device that is connected to it. There will be more devices that might be added in the future like a Camera Overlay output or a Camera License Plate Recognition and there will be codes chosen to define these too.
The uC will use these codes to assign the different devices it talks to.

Download Command 0x17 -  Tech: Each position defines the Uart assignment

Field Name

Description

Example [#of Bytes]          

Uart1

GRPS Mode

G

Uart2

MID connection (FMS/Pumps/Tags/ NRT on uart3)

M

Uart3

UHF Tagging

U

Uart4

GPS

S

Uart5

Printer

Q

Uart6

ATG

A

 

 

NB: X – Uart not is USED

 

 

 

Below a sample of the comms from the Web to the M/C

STX

[1] Hex

SiteID[3]

Hex

Packet Type[2] Hex

Payload length [1] Hex

Payload

 

CRC [1]

Hex

ETX

 [1]Hex

0x32

0x04FD00

0x02

0xnn

G|M|U|S|Q|A

XX

0x33

Reply | Threaded
Open this post in threaded view
|

Re: Download Command 0x17 - Tech: Each position defines the Uart assignment

juanchigarin
Administrator
This command is implemented with the folowing functions:
void Load_UART_Assign(char Type, uint8_t Position)
char Read_UART_Assign(uint8_t Position)
And definitions in globals.h
#define UARTS_LENGTH                    6          // Quantity of UARTS
#define UART_GPRS                         'G'         // Code for a UART used as GPRS
#define UART_MID                           'M'         // Code for a UART used as MID connection (FMS/Pumps/Tags/ NRT on uart3)
#define UART_UHF                           'U'         // Code for a UART used as UHF Tagging
#define UART_GPS                           'S'         // Code for a UART used as GPS
#define UART_PRINTER                    'Q'         // Code for a UART used as Printer
#define UART_ATG                           'A'         // Code for a UART used as ATG
#define UART_UNUSED                    'X'         // Code for unused UART