{"id":1001,"date":"2014-03-14T19:24:46","date_gmt":"2014-03-14T18:24:46","guid":{"rendered":"http:\/\/labalec.fr\/erwan\/?p=1001"},"modified":"2014-05-09T22:53:20","modified_gmt":"2014-05-09T20:53:20","slug":"arduino-play-with-a-cc1101","status":"publish","type":"post","link":"https:\/\/labalec.fr\/erwan\/?p=1001","title":{"rendered":"Arduino : play with a CC1101"},"content":{"rendered":"<p>In a <a href=\"https:\/\/labalec.fr\/erwan\/?p=497\" target=\"_blank\">previous article<\/a>, I played with an arduino combined with a <a href=\"http:\/\/dx.com\/p\/cc1101-wireless-module-w-external-antenna-blue-160898\" target=\"_blank\">TI CC1101<\/a>.<\/p>\n<p>The CC1101 is a great and cheap chip to send datas over the air at frequencies below 1ghz, using different modulations.<br \/>\nYou can tweak a great many options which should make this chip work with many other devices.<\/p>\n<p>I had been looking for weeks (months actually&#8230;) to use ASK\/OOK modulation in order to link it with my chacon temperature\/humidity sensors or even with my RFXTRX433 (from <a href=\"http:\/\/www.rfxcom.com\/\" target=\"_blank\">RFXCOM<\/a>).<\/p>\n<p>It seems I finally managed to find the right settings for ASK\/OOK : my two devices now talk to each other (@433mhz) using this modulation \ud83d\ude42<\/p>\n<p>I believe I am still a long way from talking to my chacon or rfxcom devices but still, I made some progress.<\/p>\n<p>Before I forget, here below my settings : it could be helpful for some other geeks out there.<\/p>\n<p>Now if someone out there manage to interface his cc1101 with an ASK\/OOK device, please let me know !<\/p>\n<pre>\r\n\/*\r\n# Sync word qualifier mode = 30\/32 sync word bits detected\r\n# CRC autoflush = false\r\n# Channel spacing = 199.951172\r\n# Data format = Normal mode\r\n# Data rate = 4.79794\r\n# RX filter BW = 101.562500\r\n# PA ramping = false\r\n# Preamble count = 4\r\n# Whitening = false\r\n# Address config = No address check\r\n# Carrier frequency = 433.919830\r\n# Device address = 0\r\n# TX power = 0\r\n# Manchester enable = true\r\n# CRC enable = true\r\n# Deviation = 25.390625\r\n# Packet length mode = Variable packet length mode. Packet length configured by the first byte after sync word\r\n# Packet length = 255\r\n# Modulation format = ASK\/OOK\r\n# Base frequency = 433.919830\r\n# Channel number = 0\r\n*\/\r\nvoid config2()\r\n{\r\nbyte PA_TABLE[]= {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,};\r\n\r\ncc1101.writeReg(CC1101_IOCFG0,0x06);\r\ncc1101.writeReg(CC1101_FIFOTHR,0x47);\r\ncc1101.writeReg(CC1101_PKTCTRL0,0x05);\r\ncc1101.writeReg(CC1101_FSCTRL1,0x06);\r\ncc1101.writeReg(CC1101_FREQ2,0x10);\r\ncc1101.writeReg(CC1101_FREQ1,0xB1);\r\ncc1101.writeReg(CC1101_FREQ0,0x3B);\r\ncc1101.writeReg(CC1101_MDMCFG4,0xF5);\r\ncc1101.writeReg(CC1101_MDMCFG3,0x83);\r\ncc1101.writeReg(CC1101_MDMCFG2,0x33);\r\ncc1101.writeReg(CC1101_DEVIATN,0x15);\r\ncc1101.writeReg(CC1101_MCSM0,0x18);\r\ncc1101.writeReg(CC1101_FOCCFG,0x16);\r\ncc1101.writeReg(CC1101_WORCTRL,0xFB);\r\ncc1101.writeReg(CC1101_FREND0,0x11);\r\ncc1101.writeReg(CC1101_FSCAL3,0xE9);\r\ncc1101.writeReg(CC1101_FSCAL2,0x2A);\r\ncc1101.writeReg(CC1101_FSCAL1,0x00);\r\ncc1101.writeReg(CC1101_FSCAL0,0x1F);\r\ncc1101.writeReg(CC1101_TEST2,0x81);\r\ncc1101.writeReg(CC1101_TEST1,0x35);\r\ncc1101.writeReg(CC1101_TEST0,0x09);\r\n\r\n\/\/thid 1 is needed otherwise only first packets has data\r\ncc1101.writeReg(0x07,0x00); \/\/ packet automation control\r\n\r\n\/\/notice the burst mode to write beyong the first position (0) ...\r\ncc1101.writeBurstReg(CC1101_PATABLE,PA_TABLE,8);\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In a previous article, I played with an arduino combined with a TI CC1101. The CC1101 is a great and cheap chip to send datas over the air at frequencies below 1ghz, using different modulations. You can tweak a great many options which should make this chip work with many other devices. I had been <a href='https:\/\/labalec.fr\/erwan\/?p=1001' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-1001","post","type-post","status-publish","format-standard","hentry","category-arduino","category-18-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/1001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1001"}],"version-history":[{"count":2,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/1001\/revisions"}],"predecessor-version":[{"id":1206,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/1001\/revisions\/1206"}],"wp:attachment":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}