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 31 matches
CCS Forum Index
Author Message
  Topic: A Clever Button
MassaM

Replies: 22
Views: 55660

PostForum: General CCS C Discussion   Posted: Fri Sep 20, 2019 6:06 pm   Subject: A Clever Button

I have a similar problem. I need to program a push-button with three states

Check my thread and go to 2nd page, maybe you can base your code on. Here:

Edit URL update to go to page 2 directly: ...
  Topic: Use delay_ms () after the button is released
MassaM

Replies: 7
Views: 16423

PostForum: General CCS C Discussion   Posted: Fri Sep 20, 2019 5:43 pm   Subject: Use delay_ms () after the button is released
Few comments:



#byte porta = 0x05
#byte portc = 0x07

#bit up_2 = 0x05.0
#bit down_2 = 0x05.1
#bit LED = 0x07.0



In above, if you have set the #byte porta = 0x05 an ...
  Topic: blinking led - my code does not work
MassaM

Replies: 9
Views: 19818

PostForum: General CCS C Discussion   Posted: Sun Jul 21, 2019 7:47 am   Subject: blinking led - my code does not work
Hi everyone!!

Thank for your help.

Hi MassaM

I use breadboard now. I wrote your code with own function and it works very well . Also thanks to temtronic i notice by default int is equals to ...
  Topic: blinking led - my code does not work
MassaM

Replies: 9
Views: 19818

PostForum: General CCS C Discussion   Posted: Sun Jul 21, 2019 7:40 am   Subject: blinking led - my code does not work
re: his delay function....

One possible reason...
The early versions of the compiler did not allow for 16bit values in the delay_ms(xxx) or delay_us(yyy).


Jay

Yes, this is the case. Also t ...
  Topic: blinking led - my code does not work
MassaM

Replies: 9
Views: 19818

PostForum: General CCS C Discussion   Posted: Thu Jul 18, 2019 6:32 am   Subject: blinking led - my code does not work
Hi,

Humble Opinion:

Proteus! Don't count on it. Besides, it is a simple project and you should build it on a breadboard at least. You will learn practically much more than just simulating.

S ...
  Topic: Single Digit 7 Segment Display with Increment/Decrement
MassaM

Replies: 0
Views: 19758

PostForum: Code Library   Posted: Thu Jul 18, 2019 5:27 am   Subject: Single Digit 7 Segment Display with Increment/Decrement

/*

Tutorial: Single Digit 7 Segment - Increment and Decrement with buttons and display/output
Compiler: CCS-C-PIC - PCWHD Version 5.076
Author: MassaM SDC  ...
  Topic: Debounce a Switch and Increment a value ?
MassaM

Replies: 20
Views: 64167

PostForum: General CCS C Discussion   Posted: Sun Jul 14, 2019 6:01 pm   Subject: Debounce a Switch and Increment a value ?

Here is yet another debounce technique. I had an existing piece of hardware that had 2 pushbuttons (SELECT, ENTER) and a 2-line LCD for an interface.
I needed to make the buttons responsive & ...
  Topic: mode select switcher using counter not keeping previous mode
MassaM

Replies: 17
Views: 35679

PostForum: General CCS C Discussion   Posted: Sun Jul 14, 2019 5:40 pm   Subject: mode select switcher using counter not keeping previous mode
Hello to all,

Ok, I know the code you are about to see below,Shocked is messy, horrible and a pain for the experts eye! but, the start of all great things is ugly! Wink

The double press and l ...
  Topic: mode select switcher using counter not keeping previous mode
MassaM

Replies: 17
Views: 35679

PostForum: General CCS C Discussion   Posted: Sat Jul 13, 2019 5:02 am   Subject: mode select switcher using counter not keeping previous mode
Here's the info from the CCS Manual. I just press F11 while my project is open and the manual opens. I don't see a version number on the 1st page, but this code has been in the manual for years.

.. ...
  Topic: mode select switcher using counter not keeping previous mode
MassaM

Replies: 17
Views: 35679

PostForum: General CCS C Discussion   Posted: Fri Jul 12, 2019 7:38 pm   Subject: mode select switcher using counter not keeping previous mode
re:

'How do I wait only a specified time for a button press?'

It's the 5th or 6th entry under the 'Common Questions & Answers' section of the manual.
I've used a variation of it for a 'sho ...
  Topic: mode select switcher using counter not keeping previous mode
MassaM

Replies: 17
Views: 35679

PostForum: General CCS C Discussion   Posted: Fri Jul 12, 2019 10:59 am   Subject: mode select switcher using counter not keeping previous mode
The running counter i meant, in the timer0_isr,
But previously you said:

In simple terms, I need one single button that can shift between
machine operating state aka modes of operation depending ...
  Topic: mode select switcher using counter not keeping previous mode
MassaM

Replies: 17
Views: 35679

PostForum: General CCS C Discussion   Posted: Fri Jul 12, 2019 10:22 am   Subject: mode select switcher using counter not keeping previous mode
Do you honestly think you can hold a button for those precise amounts
of time ? Or is it actually not a button ? Is it really a pulse from some
un-named device ?

Apologies. The running counter ...
  Topic: mode select switcher using counter not keeping previous mode
MassaM

Replies: 17
Views: 35679

PostForum: General CCS C Discussion   Posted: Fri Jul 12, 2019 10:13 am   Subject: mode select switcher using counter not keeping previous mode
In the FAQ or Q&A section of the manual...find this...

'How do I wait only a specified time for a button press?'

it is another way to do the 'timed button' operation.

There is a 'logic' p ...
  Topic: mode select switcher using counter not keeping previous mode
MassaM

Replies: 17
Views: 35679

PostForum: General CCS C Discussion   Posted: Fri Jul 12, 2019 5:07 am   Subject: mode select switcher using counter not keeping previous mode
Thank you for taking time out to answer my question and write/post code, and I greatly appreciate the valuable information you have provided me with.

Also apologies for not being clear on what I am ...
  Topic: mode select switcher using counter not keeping previous mode
MassaM

Replies: 17
Views: 35679

PostForum: General CCS C Discussion   Posted: Thu Jul 11, 2019 7:08 pm   Subject: mode select switcher using counter not keeping previous mode
Proteus is known to be full of bugs, errors and fulty DRCs.
It simply cannot be trusted, as it even gets SIMPLE things wrong....

Your code can be made simpler, more efficient as you're only workin ...
 
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