USART2 setting for 1MHzCPU + 4PLL


Closed Thread
Results 1 to 33 of 33

Hybrid View

  1. #1
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: USART2 setting for 1MHzCPU + 4PLL

    sleep was the first routine setup for this project

    Code:
     =========== Power Shutdown routine ==================
    Shut_Down:
    
     pwr_on = 1                              ' PWR ON = 1 = OFF  - turns off power to devices external to cpu 
    @ INT_DISABLE  RBC_INT                   ; TURN OFF PortB IOC Interrupts for RX_mode  - RF_IRQ pin  
    @ INT_DISABLE  RX2_INT                   ; Turn Off  USART RX Interrupts for RX_mode  - RX input on USART 
    @ INT_DISABLE  TMR0_INT                  ; disable  Timer0 interupts 
    gosub RF_Powerdown                       ' shut down rf module 
     TRISA = $FF                             ' reduce power usage by puting port to inputs 
     TRISC = $FF
     TRISD = $F7                             ' make all ports inputs except portd.3 for PWR_ON output
     TRISE = $FF
     
     WPUB  = $00                             ' Port B set to inputs already , turn off all week pullups 
    
     PMD0 = $FF                              ' TURN OFF ALL PERIPHERALS ON CPU 
     PMD1 = $FF
     PMD2 = $FF
     
     PWR_shutdown = 0                        ' CLEAR shutdown flag 
     INTCON.1 = 0                            ' CLEAR INT0 interupt flag prior to enable  
    @ INT_ENABLE INT0_INT                    ; Enable INT0 interupt to allow wakeup from Sleep command  - Triggered by PWR_SW , active Low  
    OSCCON.7 =0                              ' clear  IDLEN bit ready for sleep command 
    @ sleep                                  ; sleep command 
    @ NOP
    
     return

  2. #2
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default Re: USART2 setting for 1MHzCPU + 4PLL

    Then why do you need to run at 1MHz? You can achieve an average current consumption of <0.4mA by running the clock at 64MHz (according to data in your post) - far less than the 1.04mA that you are hoping to achieve.
    Why pay for overpriced toys when you can have
    professional grade tools for FREE!!!

Similar Threads

  1. Micrtochip AN1310 for USART2
    By cerr99 in forum mel PIC BASIC
    Replies: 1
    Last Post: - 27th May 2011, 19:59
  2. USBBufferSize setting
    By Ronald123 in forum USB
    Replies: 4
    Last Post: - 18th April 2008, 13:33
  3. Setting up the oscillator
    By J_norrie in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 2nd October 2007, 15:53
  4. setting up HPWM
    By sunny in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 22nd October 2006, 02:36
  5. setting register
    By volcane in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 19th April 2006, 23:46

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts