Size: 223
Comment:
|
← Revision 23 as of 2025-03-09 22:00:12 ⇥
Size: 3604
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
<<TableOfContents(2)>> |
|
Line 9: | Line 11: |
dmesg output after connecting pickit2 in Slackware 14 {{{ [ 4575.020360] usb 1-1.2: new full-speed USB device number 8 using ehci_hcd [ 4575.108973] usb 1-1.2: New USB device found, idVendor=04d8, idProduct=0033 [ 4575.108991] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 4575.109004] usb 1-1.2: Product: PICkit 2 Microcontroller Programmer [ 4575.109047] usb 1-1.2: Manufacturer: Microchip Technology Inc. [ 4575.109061] usb 1-1.2: SerialNumber: Ð }}} == DS1620 == * https://datasheets.maximintegrated.com/en/ds/DS1620.pdf Digital Thermometer and Thermostat == LM35 == * https://www.ti.com/lit/ds/symlink/lm35.pdf LM35 Precision Centigrade Temperature Sensors == TMP35 == * https://www.analog.com/media/en/technical-documentation/data-sheets/TMP35_36_37.pdf Low Voltage Temperature Sensors TMP35/TMP36/TMP37 Low voltage operation (2.7 V to 5.5 V) == LM335 == * https://www.ti.com/lit/ds/symlink/lm335.pdf?ts=1665785845616&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FLM335 The LM335 operates from −40°C to 100°C. == SDCC compiler == * http://sdcc.sourceforge.net/ * http://sdcc.sourceforge.net/mediawiki/index.php/SDCC_tutorial * https://github.com/diegoherranz/sdcc-examples * https://deac-fra.dl.sourceforge.net/project/sdcc/sdcc-linux-amd64/4.2.0/sdcc-4.2.0-amd64-unknown-linux2.5.tar.bz2 == Debian install of pk2cmd and sdcc == {{{#!highlight bash sudo apt install sdcc cd ~ git clone https://github.com/psmay/pk2cmd.git cd pk2cmd/ cd pk2cmd/ sudo apt install libusb-dev make clean make linux sudo make install sudo cp PK2DeviceFile.dat /usr/local/bin/ pk2cmd -PPIC16F689 pk2cmd pk2cmd -PPIC16F689 /T # power on pk2cmd -PPIC16F689 # power off wget https://deac-fra.dl.sourceforge.net/project/sdcc/sdcc-linux-amd64/4.2.0/sdcc-4.2.0-amd64-unknown-linux2.5.tar.bz2 cd /tmp/ rm -rf sdcc-4.2.0 tar xvif sdcc-4.2.0-amd64-unknown-linux2.5.tar.bz2 cd sdcc-4.2.0/ sudo cp -r * /usr/local /usr/local/bin/sdcc -v }}} == Headers for pic16f689 and pic16f690 == * /usr/local/share/sdcc/non-free/include/pic14/pic16f689.h * /usr/local/share/sdcc/non-free/include/pic14/pic16f690.h == Eclipse for C/C++ == * Download from https://www.eclipse.org/downloads/download.php?file=/oomph/epp/2022-09/R/eclipse-inst-jre-linux64.tar.gz&mirror_id=1190 {{{#!highlight bash cd ~/Downloads cp eclipse-inst-jre-linux64.tar.gz /tmp cd /tmp/ tar xvzf eclipse-inst-jre-linux64.tar.gz cd /tmp/eclipse-installer ./eclipse-inst }}} * Eclipse ide for c/c++ developers * Installation folder: /home/vitor/eclipse/cpp-2022-092 * Install * Accept * Launch Eclipse IDE 2022-09 * Workspace: /home/vitor/eclipse-workspace * Use as default * Launch * Import project * C/C++ * Existing code as Makefile project * Next * Existing code location: ~/Documents/sdcc/enableled * Open * Finish * Window, preferences, general, appearance, theme: dark * Project, properties, c/c++ general, paths and variables, includes tab, * add /usr/local/share/sdcc/non-free/include/ * add /usr/local/share/sdcc/include * add to all configurations, add to all languages * ok * apply and close * Project, build project * cd ~/eclipse/cpp-2022-092/eclipse * cp icon.xpm ~/GNUstep/Library/Icons/eclipse.xpm |
Contents
pickit
Programmer for Microchip microcontrollers.
Link for pk2cmd https://github.com/psmay/pk2cmd
Connector pickit2 to USB and use the command
- pk2cmd -PPIC16F689
to check if the uC is on the pickit2 board
dmesg output after connecting pickit2 in Slackware 14
[ 4575.020360] usb 1-1.2: new full-speed USB device number 8 using ehci_hcd [ 4575.108973] usb 1-1.2: New USB device found, idVendor=04d8, idProduct=0033 [ 4575.108991] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 4575.109004] usb 1-1.2: Product: PICkit 2 Microcontroller Programmer [ 4575.109047] usb 1-1.2: Manufacturer: Microchip Technology Inc. [ 4575.109061] usb 1-1.2: SerialNumber: Ð
DS1620
Digital Thermometer and Thermostat
LM35
LM35 Precision Centigrade Temperature Sensors
TMP35
Low Voltage Temperature Sensors TMP35/TMP36/TMP37 Low voltage operation (2.7 V to 5.5 V)
LM335
The LM335 operates from −40°C to 100°C.
SDCC compiler
Debian install of pk2cmd and sdcc
1 sudo apt install sdcc
2 cd ~
3 git clone https://github.com/psmay/pk2cmd.git
4 cd pk2cmd/
5 cd pk2cmd/
6 sudo apt install libusb-dev
7 make clean
8 make linux
9 sudo make install
10 sudo cp PK2DeviceFile.dat /usr/local/bin/
11 pk2cmd -PPIC16F689
12 pk2cmd
13 pk2cmd -PPIC16F689 /T # power on
14 pk2cmd -PPIC16F689 # power off
15
16 wget https://deac-fra.dl.sourceforge.net/project/sdcc/sdcc-linux-amd64/4.2.0/sdcc-4.2.0-amd64-unknown-linux2.5.tar.bz2
17 cd /tmp/
18 rm -rf sdcc-4.2.0
19 tar xvif sdcc-4.2.0-amd64-unknown-linux2.5.tar.bz2
20 cd sdcc-4.2.0/
21 sudo cp -r * /usr/local
22 /usr/local/bin/sdcc -v
Headers for pic16f689 and pic16f690
- /usr/local/share/sdcc/non-free/include/pic14/pic16f689.h
- /usr/local/share/sdcc/non-free/include/pic14/pic16f690.h
Eclipse for C/C++
Download from https://www.eclipse.org/downloads/download.php?file=/oomph/epp/2022-09/R/eclipse-inst-jre-linux64.tar.gz&mirror_id=1190
- Eclipse ide for c/c++ developers
- Installation folder: /home/vitor/eclipse/cpp-2022-092
- Install
- Accept
- Launch Eclipse IDE 2022-09
- Workspace: /home/vitor/eclipse-workspace
- Use as default
- Launch
- Import project
- C/C++
- Existing code as Makefile project
- Next
- Existing code location: ~/Documents/sdcc/enableled
- Open
- Finish
- Window, preferences, general, appearance, theme: dark
- Project, properties, c/c++ general, paths and variables, includes tab,
- add /usr/local/share/sdcc/non-free/include/
- add /usr/local/share/sdcc/include
- add to all configurations, add to all languages
- ok
- apply and close
- Project, build project
- cd ~/eclipse/cpp-2022-092/eclipse
- cp icon.xpm ~/GNUstep/Library/Icons/eclipse.xpm