Skip to content

Instantly share code, notes, and snippets.

__ __ ___ _ __ __ __ __ ___ _____ ____
\ \/ / / __\/ | / /_ / / \ \/ / / __\|___ / |___ \
\ / / / | || '_ \ / / \ / / / |_ \ __) |
/ \ / /___ | || (_) | / / / \ / /___ ___) | / __/
/_/\_\\____/ |_| \___/ /_/ /_/\_\\____/ |____/ |_____|
r e s t r i c t i o n r e m o v a l r e v 4
/*------------------------------------------------------------------------------
___ ___ ___ ___ _ _ ___ ___
| \ | __|| __||_ _|| \| || __|/ __|
| |) || _| | _| | | | .` || _| \__ \
|___/ |___||_| |___||_|\_||___||___/
------------------------------------------------------------------------------*/
//my pin macros
#define _PIN_SET(pt,pn,v) LAT##pt##pn = v
#define _PIN_TOGGLE(pt,pn) LAT##pt##pn = ~LAT##pt##pn
#define BAUDRATE 19200
//clock freq
#define _XTAL_FREQ 8000000
//rx baud /64 /16 /16 /4
#define BAUDH 1 //0 1 0 1
#define BAUD16 1 //0 0 1 1
#define BAUDVAL (_XTAL_FREQ/BAUDRATE/4/((BAUDH^1)*3+1)/((BAUD16^1)*3+1)-1)
//rom user id addresses
#define ROM_ROW_SIZE 32
#define ROM_ID 0x8000
#define ROM_ID0 0x8000
#define ROM_ID1 0x8001
#define ROM_ID2 0x8002
#define ROM_ID3 0x8003
#define ROM_MY_ADDRESS ROM_ID0
/*------------------------------------------------------------------------------