Skip to content

Instantly share code, notes, and snippets.

View maciek134's full-sized avatar

Maciej Sopyło maciek134

View GitHub Profile
@maciek134
maciek134 / jlcpart.ts
Created May 17, 2020 18:14
Search JLCPCB SMT parts library from CLI (using Deno)
#!/usr/bin/env -Sdeno run --allow-net
import { parse } from "https://deno.land/std/flags/mod.ts";
import { red, bold, green, blue } from "https://deno.land/std/fmt/colors.ts";
import { sprintf } from "https://deno.land/std/fmt/sprintf.ts";
export interface ComponentPrice {
endNumber: number;
productPrice: number;
startNumber: number;
EEPROM_write:
; Wait for completion of previous write
sbic EECR,EEPE
rjmp EEPROM_write
; Set Programming mode
ldi r16, (0<<EEPM1)|(0<<EEPM0)
out EECR, r16
; Set up address (r17) in address register
out EEARL, r17
; Write data (r16) to data register