gamesfairy ([info]gamesfairy) wrote,
@ 2009-05-28 03:07:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
Right, University term has ended, and I want to get some serious progress with lavalamp. Here's hoping. A summary of the night's work:

* Am intended to add support for Zigbee, via the Microchip MRF24J40 2.4Ghz transceiver. This may well require that I rewrite a lot of PIC-side code, but I think it'll be worth it, since the wireless layer I wrote isn't particularly great, and using Zigbee opens the door for some cool interoperability. It does, however, require quite a beefy PIC chip to run the software stack.

* I'm using a PIC18F46K20, instead of an PIC18F4620, mainly because it's cheaper (and more powerful). Hopefully I can make it work. I had to make the following changes to the example code (the co-ordinator project) to change microcontroller:

- in zLink.lkr, the linker script, change

DATABANK NAME=gpr0 START=0x0060 END=0x00FF
to
DATABANK NAME=gpr0 START=0x0080 END=0x00FF
(since bank 1 GPRs start at 0x80 and not 0x60)

and

DATABANK NAME=gpr15 START=0x0F00 END=0x0F7F
ACCESSBANK NAME=accesssfr START=0x0F80 END=0x0FFF PROTECTED

to
DATABANK NAME=gpr15 START=0x0F00 END=0x0F5F
ACCESSBANK NAME=accesssfr START=0x0F60 END=0x0FFF PROTECTED

(since bank 15 GPRs start at 0x0F5F and not 0x0F7F, and SFRs start at 0x0F60.)

also change
FILES p18f4620.lib
to
FILES p18f46K20.lib

- In zNVM.c, change

#if defined(__18F4620) && !defined(USE_EXTERNAL_NVM)
to
#if (defined(__18F4620) || defined(__18F46K20)) && !defined(USE_EXTERNAL_NVM)

- and similarly, in zigbee.def

#if !defined(__18F4620)
to
#if (!defined(__18F4620) && !defined(__18F46K20))

I just know this info will be useful to someone!

* My ICD2 warned me that Vpp was going to go too high for the device. I put a ~8V zener across it, under recommendation from The Internet, and it seems to work.

* I realised that the PIC18F46K20 is a 3.3V device, sometime after applying 5V to it. Ooops.

* I realised that the three-pin 3V3 regulators I have aren't 7805-pinout'ed, after neglecting to read their part numbers and hooking them up as if they were. Burnt my finger.

* Realised that having a pluggable 'transport' layer in lavalamp would be a really damn good idea, as then I can make a 'simple cabled' transport (probs SPI/ttl-level rs232 or the like) for simple stuff, a 'lavalamp native' transport (the one I have been working on to run over any RF Tx/Rx, which currently needs a lot of work) and 'Zigbee' for running Zigbee via the Microchip transcievers. This'd be a lot better than my current design, which has little abstraction between the transport layer and those above.



Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…