Jan-Erik Soderholm wrote: > Actualy, since we (currently) are planning to use Wouters > "Dwarf-boards" as the PIC-platform, I think that I'll see if the code > is easily ported to a 18F252. There doesn't seem to be any major > problem with that judging from the shematics. I'll install a copy of > HOS in the Embedinc/Olin environment and take a look at it. I'll assume you meant HAL project, not HOS, since HOS is just a template and doesn't do anything useful or cool by itself. It will take some work but shouldn't be too bad. It's been years since I've been in that code, but some things I can think of off the top of my head: 1 - The larger program memory space of the 18F252 will allow for longer total stored sound or high sampling rate. All in all you get about twice the length*bandwidth of the 16F876. 2 - Some of the code is specific to the 14 bit program memory word size of the PIC 16, and it goes thru some trouble to treat a 14 bit word as two 7 bit samples. This will have to be rewritten. However, using 8 bit samples in individually addressed locations of the 18F program memory will be easier. 3 - For quick porting, you can still use the 7 bit samples stored in 8 bit bytes. It won't be any worse than the existing version but that way you won't have to create new sound files. 4 - The CCP module setup will be a little different. 5 - The usual gotchas of porting 16 code to an 18 apply. I probably didn't count on DECF and INCF not modifying the carry bit, for example, but its probably looking over everything once to save chasing strange flaky problems later. 6 - I think the PIC 16 interrupt routine structure will work on the PIC 18, but I would replace that with the proper PIC 18 structure. I would start the interrupt module with the QQQ_INTR18.ASPIC template, then move code from the old module into it as its it's converted. The code in this module will need the most rewrite anyway. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics