CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Search found 38 matches
CCS Forum Index
Author Message
  Topic: Wake Up time high when timer1 enabled in sleep
gabirelms

Replies: 29
Views: 40180

PostForum: General CCS C Discussion   Posted: Wed Jul 16, 2014 11:16 am   Subject: Wake Up time high when timer1 enabled in sleep
Ok, I will simplify the code, no usb, no spi.

As simple as this:
Mcu sleeping all time.
Timer1 runing from external 32khz, interrupt on overflow every 2sec.
If I press button (short RB7 to gnd), ...
  Topic: Wake Up time high when timer1 enabled in sleep
gabirelms

Replies: 29
Views: 40180

PostForum: General CCS C Discussion   Posted: Wed Jul 16, 2014 6:24 am   Subject: Wake Up time high when timer1 enabled in sleep
I don't know why it is not working, I tried with 10pF and 27pF load caps.
  Topic: Wake Up time high when timer1 enabled in sleep
gabirelms

Replies: 29
Views: 40180

PostForum: General CCS C Discussion   Posted: Wed Jul 16, 2014 4:50 am   Subject: Wake Up time high when timer1 enabled in sleep
I tested with 1mhz and 2mhz crystals, but it doesn't work. I think timer1 can only work with 32khz crystal.

I'm starting to think that I made a big mistake choosing this PIC without interrupt prefe ...
  Topic: Wake Up time high when timer1 enabled in sleep
gabirelms

Replies: 29
Views: 40180

PostForum: General CCS C Discussion   Posted: Tue Jul 15, 2014 5:19 am   Subject: Wake Up time high when timer1 enabled in sleep
Thanks very much for your replies. I will work more on the code.

But the main problem is still there, timer1 interrupts still making mcu to wake up slow.
I want to try a new idea, use 1mhz crystal ...
  Topic: Wake Up time high when timer1 enabled in sleep
gabirelms

Replies: 29
Views: 40180

PostForum: General CCS C Discussion   Posted: Tue Jul 15, 2014 3:31 am   Subject: Wake Up time high when timer1 enabled in sleep
Clear code:


#define USB_HW_CCS_16F1459
#include <16LF1459.h>
#FUSES NOWDT //No Watch Dog Timer
#FUSES NOBROWNOUT //No brownout reset
#FUSES NOLVP ...
  Topic: Wake Up time high when timer1 enabled in sleep
gabirelms

Replies: 29
Views: 40180

PostForum: General CCS C Discussion   Posted: Mon Jul 14, 2014 12:14 pm   Subject: Wake Up time high when timer1 enabled in sleep
Yes, timer log is written to external SPI flash.

I don't think writing to memory is the issue. First: ON Led, Second: Copy to memory.

If I disable timer1 during sleep, it wakes-up very fast, and ...
  Topic: Wake Up time high when timer1 enabled in sleep
gabirelms

Replies: 29
Views: 40180

PostForum: General CCS C Discussion   Posted: Mon Jul 14, 2014 10:59 am   Subject: Wake Up time high when timer1 enabled in sleep
Sorry, I don't know how to use many functions yet.

I want timer1 running all time, and when I press the button, MCU has to wake up, ON a led, and write current timer in the memory.
  Topic: Wake Up time high when timer1 enabled in sleep
gabirelms

Replies: 29
Views: 40180

PostForum: General CCS C Discussion   Posted: Mon Jul 14, 2014 5:50 am   Subject: Wake Up time high when timer1 enabled in sleep
Hi, I've been working on it since last week, and I don't find a solution yet.

This code is working, the only issue is the delay for detecting the interrupt when the timer1 is working. If timer1 is ...
  Topic: Wake Up time high when timer1 enabled in sleep
gabirelms

Replies: 29
Views: 40180

PostForum: General CCS C Discussion   Posted: Mon Jul 07, 2014 11:04 am   Subject: Wake Up time high when timer1 enabled in sleep
CCS compiler 5.015

timer1 is working from external crystal,32.768k, 2 seconds the interrupt works.

Please see the Sleep area code.

This is what I made first:

if(time_sleep>=2)
...
  Topic: Wake Up time high when timer1 enabled in sleep
gabirelms

Replies: 29
Views: 40180

PostForum: General CCS C Discussion   Posted: Mon Jul 07, 2014 5:52 am   Subject: Wake Up time high when timer1 enabled in sleep
The timer will then be serviced.
I don't understand this. Now timer1 stops during sleep.

However if you want the timer routine to update, the timer routine needs to be called sometime.
It is in s ...
  Topic: Wake Up time high when timer1 enabled in sleep
gabirelms

Replies: 29
Views: 40180

PostForum: General CCS C Discussion   Posted: Mon Jul 07, 2014 5:43 am   Subject: Wake Up time high when timer1 enabled in sleep
Hi Ttelmah,

I did as you said, but timer1 stopped working inside sleep mode when disabled global interrupt. Any idea ?
  Topic: Produce a 2Mhz square wave
gabirelms

Replies: 23
Views: 26750

PostForum: General CCS C Discussion   Posted: Sun Jul 06, 2014 7:15 am   Subject: Produce a 2Mhz square wave
Thanks again for your help.
I will try that.

By the way, this is neither USART nor spi, right ?
  Topic: Produce a 2Mhz square wave
gabirelms

Replies: 23
Views: 26750

PostForum: General CCS C Discussion   Posted: Sun Jul 06, 2014 5:23 am   Subject: Produce a 2Mhz square wave
I'm sorry, I explained myself very bad. I'm very new to PIC programming and I'm experimenting with things harder than my level. I really appreciate all replies.

To read data from the buffer memory: ...
  Topic: Produce a 2Mhz square wave
gabirelms

Replies: 23
Views: 26750

PostForum: General CCS C Discussion   Posted: Sat Jul 05, 2014 5:35 am   Subject: Produce a 2Mhz square wave
Well, I'm using SPI to connect PIC to SPI flash. Which needs 4 wires: CS, SDI, SDO, and SCK.

And the sensor only has 2 wires: data (output of the sensor), and strobe (input of the sensor). I think ...
  Topic: Produce a 2Mhz square wave
gabirelms

Replies: 23
Views: 26750

PostForum: General CCS C Discussion   Posted: Sat Jul 05, 2014 1:49 am   Subject: Produce a 2Mhz square wave
This is a multi-axis sensor with data buffer.
Data sheet is not public, but the idea is quite simple, to extract information from buffer I have to send strobe, and receive data.
Maximum strobe frequ ...
 
Page 1 of 3 Goto page 1, 2, 3  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group