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 10 matches
CCS Forum Index
Author Message
  Topic: ds18b20 one code on multiple pins
Danni

Replies: 11
Views: 22838

PostForum: General CCS C Discussion   Posted: Tue Jul 12, 2016 2:35 pm   Subject: ds18b20 one code on multiple pins
But when i need 8 or 10 sensors it's a loooong code.

i did copy the code on a pic i have with two sensors.

i have changed all the code but only need the line output_bit(DQ, shift_right(&val, ...
  Topic: ds18b20 one code on multiple pins
Danni

Replies: 11
Views: 22838

PostForum: General CCS C Discussion   Posted: Tue Jul 12, 2016 12:29 pm   Subject: ds18b20 one code on multiple pins
Hello guys.

im trying to adapt my ds18b20 code so i can change pin number and use the same code on multiple pins.

Im using case to change pin number and it works until the line with !!!!!:


...
  Topic: the difference between PIC18f26k22 and PIC16f1847
Danni

Replies: 15
Views: 29059

PostForum: General CCS C Discussion   Posted: Tue Mar 08, 2016 1:10 pm   Subject: the difference between PIC18f26k22 and PIC16f1847
I looked the datasheet again and again but all seems right...

Now i put the same code on a pic12f1840 and its works great... So there must be something with the 16f1847...
  Topic: the difference between PIC18f26k22 and PIC16f1847
Danni

Replies: 15
Views: 29059

PostForum: General CCS C Discussion   Posted: Sun Mar 06, 2016 1:33 pm   Subject: the difference between PIC18f26k22 and PIC16f1847
But how does this work??


int8 read_byte(void)
{
int8 i;
int8 val = 0;

for(i=0 ; i<8 ; i++)
{
if(read_bit()) val |= (0x01 < ...
  Topic: the difference between PIC18f26k22 and PIC16f1847
Danni

Replies: 15
Views: 29059

PostForum: General CCS C Discussion   Posted: Sat Mar 05, 2016 2:54 pm   Subject: the difference between PIC18f26k22 and PIC16f1847
I use a red/green led to blink the binary temperature out.
I used that on my demo board too, because its easy to see whats 1 and 0:
and a blink at the end.



#include <16f1847.h>

#dev ...
  Topic: the difference between PIC18f26k22 and PIC16f1847
Danni

Replies: 15
Views: 29059

PostForum: General CCS C Discussion   Posted: Sat Mar 05, 2016 2:30 pm   Subject: the difference between PIC18f26k22 and PIC16f1847
I use this now:



#include <16f1847.h>

#device adc=10

#FUSES NOWDT //No Watch Dog Timer
#FUSES NOBROWNOUT //No brownout reset
#FUSES NOLVP //No ...
  Topic: the difference between PIC18f26k22 and PIC16f1847
Danni

Replies: 15
Views: 29059

PostForum: General CCS C Discussion   Posted: Sat Mar 05, 2016 1:21 pm   Subject: the difference between PIC18f26k22 and PIC16f1847
when i use int8 scratch[9];
i get the error Unable to resolve identifier scratch

I read somewhere that signed int is the same as int :-S
  Topic: the difference between PIC18f26k22 and PIC16f1847
Danni

Replies: 15
Views: 29059

PostForum: General CCS C Discussion   Posted: Sat Mar 05, 2016 8:01 am   Subject: the difference between PIC18f26k22 and PIC16f1847
Yes sorry forgot to remove it.

The only thing i changed is i could not complie int8 scratch[9];

So changed it to Signed int8 scratch[9]; but isn't that the same or?
  Topic: the difference between PIC18f26k22 and PIC16f1847
Danni

Replies: 15
Views: 29059

PostForum: General CCS C Discussion   Posted: Sat Mar 05, 2016 5:37 am   Subject: the difference between PIC18f26k22 and PIC16f1847
I think it's something with the setup but it has not solved the problem yet.

I have made two flashing diodes and they worked fine and 1 second seems to fit.
Also before i removed #fuses hs :-)
  Topic: the difference between PIC18f26k22 and PIC16f1847
Danni

Replies: 15
Views: 29059

PostForum: General CCS C Discussion   Posted: Sat Mar 05, 2016 1:42 am   Subject: the difference between PIC18f26k22 and PIC16f1847
Hello.

I am new in microcontroller and has a pickit 3 and a demo print with PIC18f26k22 I've tried different things.

Now I made a print with a PIC16f1847 and can not figure out what I need to do ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group