Step 3

Integrating into Eagle3D

Now we have converted the file to work in Eagle3D we now need to tell Eagle3D how to use it.

  1. Add your include file to the user.inc file
    #ifndef(__user_inc)
    #declare __user_inc = true;
    
        #include "MRF24J40MA.inc"
    #end
  2. Now open and add the following to the end of 3dusrpac.dat (found in the Eagle3D install directory)
    PACKAGE_NAME:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:MACRO_NAME(::
  3. To find the PACKAGE_NAME, first go back to your PCB editor in Eagle, click the info button, then click on the component we have just created the library for.image
  4. Replace PACKAGE_NAME with the Package variable. In this case it is MRF24J40MA Note that this is always in caps!
  5. Next, we need to replace MACRO_NAME with the exact macro name we added to the file in step 2. In this example it’s MRF24J40MA.
  6. The line should now look like this
    MRF24J40MA:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:MRF24J40MA(::
  7. Now run the Eagle3D ulp script and create the the POV file for the PCB.image
  8. Open the POV file and scroll down until and check that the component has been added to the file (line 3 below)
       1: #ifndef(pack_S1) #declare global_pack_S1=yes; object {SWITCH_SECME_1K2_RH()translate<0,0,4> rotate<0,180.000000,0>rotate<0,-180.000000,0> rotate<0,0,0> translate<41.910000,0.000000,1.727200>}#end        // S1  SWITCH-SPDT-SMD
       2: #ifndef(pack_U1) #declare global_pack_U1=yes; object {QFP_TQFP_32_080MM("ATMEGA168V","ATMEL",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-45.000000,0> rotate<0,0,0> translate<26.670000,0.000000,16.510000>translate<0,0.035000,0> }#end        //TQFP-32 U1 ATMEGA168V TQFP32-08
       3: #ifndef(pack_U2) #declare global_pack_U2=yes; object {MRF24J40MA()translate<0,0,0> rotate<0,0.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<61.569600,0.000000,15.240000>}#end        //MRF24J40MA FCC Approved module U2 MRF24J40MA MRF24J40MA
       4: }//End union
  9. Now render your PCB, more than likely a couple of problems will show up.  The first is your component is very small.  so we need to tweak the scaling from within the component file we recreated in the previous steps.
<< Step 2 Step 4 >>

Come join the Darkside Skywalker…..The Switch from PIC to AVR

I’ve been playing around with the Arduino Diecimila and the ATMEGA168 over the last couple of weeks to better familiarise myself with the AVR ATMega168 MCU, I’ve been using PICs on and off the last few years, but the decision was made to use the ATMEGA as the MCU of choice for the Strobit Triggr project, mainly due to the open source tool chains available, and the simply programmer required.

In short I’m glad I’ve made the switch and I must say I’m loving the learning experience.  I’ve moved from the Arduino software development platform as I found it very limiting and am now using the open source avr-gcc (win-avr) and Eclipse, using the AVR plugin and CDT plugin as my development platform of choice, I’m comfortable with eclipse as my editor as I’ve been using this for my Java development for the last 5 or so years.

As a task I set for myself to learn the onboard peripherals,  I’ve created a Weather Shield for the Arduino, so far it has the RFM12B RF module, DS1307 RTC, HH10D Humidity Sensor, a HP03D, combined barometric pressure and temperature sensor, and soon to have a light sensor and Dallas 1-Wire interface for talking to the Dallas Weather Station that I’ve had lying around in a box for the last 10 years, (yes one of the original ones released by Dallas in 1998, I’ve been waiting to move in my house for a long time),  I’ll post the weather shield design up on a separate topic later, but suffice to say, I’ve enjoyed playing with the SPI, I2C, ICP, UART and onboard timers.