Author |
Message |
Topic: syntax of Shift & Rotate ? |
Don P
Replies: 4
Views: 4975
|
Forum: General CCS C Discussion Posted: Sun Dec 21, 2008 5:08 pm Subject: syntax of Shift & Rotate ? |
I'm having little luck making the shift & rotate left & right functions work.
In particular, I declare int xx[0]=0x0F;
x[1]=0x00;
x[2]=0x03;
x[3]=0x ... |
Topic: 16f628 A4 output |
Don P
Replies: 16
Views: 32889
|
Forum: General CCS C Discussion Posted: Tue Jul 26, 2005 1:09 pm Subject: 16f628 A4 output |
Look at the internal equivalent circuit of a 2003 . . . to give typically 1.6v. Since Vih for A4 is typically 4v, as PCM Programmer says, you _will_ see the RMW problem.
Thanks both! I dropped the ... |
Topic: 16f628 A4 output |
Don P
Replies: 16
Views: 32889
|
Forum: General CCS C Discussion Posted: Tue Jul 26, 2005 12:08 am Subject: 16f628 A4 output |
see a couple msgs back. ( This forum doesn't seem to like cut & paste from other posts). It's 22K driving 2003, which has diode built in. And relay isn't hooked up yet; just an LED. Simple prog ... |
Topic: 16f628 A4 output |
Don P
Replies: 16
Views: 32889
|
Forum: General CCS C Discussion Posted: Mon Jul 25, 2005 11:53 pm Subject: 16f628 A4 output |
Yup, I did the shadow_Port_A thing from your example -- same. |
Topic: 16f628 A4 output |
Don P
Replies: 16
Views: 32889
|
Forum: General CCS C Discussion Posted: Mon Jul 25, 2005 11:39 pm Subject: 16f628 A4 output |
Oh yeah -- pullups & diodes . . .
It's a 22K pull-up on A4, which feeds an input to a 7-channel 2003 darlinton chip, that will (eventually) run the relay. The 2003 already incorporates suppres ... |
Topic: 16f628 A4 output |
Don P
Replies: 16
Views: 32889
|
Forum: General CCS C Discussion Posted: Mon Jul 25, 2005 11:05 pm Subject: 16f628 A4 output |
Sorry, been a few days getting back to this project. Humberto's suggestion doesn't illustrate the problem because I can get A4 to respond momentarily, and I have put delays after the commands to see ... |
Topic: 16f628 A4 output |
Don P
Replies: 16
Views: 32889
|
Forum: General CCS C Discussion Posted: Thu Jul 21, 2005 5:10 pm Subject: 16f628 A4 output |
#include <16F628.h>
#fuses nowdt,nolvp,intrc_io,noput,nomclr,protect
// internal clock
#use delay( clock=4000000 )
#nolist
#include <string.h>
#list
/*
A4 output to channel 3 of ... |
Topic: 16f628 A4 output |
Don P
Replies: 16
Views: 32889
|
Forum: General CCS C Discussion Posted: Thu Jul 21, 2005 1:53 pm Subject: 3.152 |
3.152 |
Topic: 16f628 A4 output |
Don P
Replies: 16
Views: 32889
|
Forum: General CCS C Discussion Posted: Thu Jul 21, 2005 1:28 pm Subject: 16f628 A4 output |
I'm using A4 as an output (with a pullup resistor), but something continuously keeps it low. I CAN make it high by doing an output_high followed by a delay, just as a test. But without the delay, so ... |
Topic: int RC clock good enough for serial comms? |
Don P
Replies: 6
Views: 9053
|
Forum: General CCS C Discussion Posted: Fri Mar 25, 2005 10:26 am Subject: int RC clock good enough for serial comms? |
Thanks for the insight. I still can't find the page (out of 144) that shows the clock specs. I wonder if the accuracy is related more to temperature or to individual parts. If it was stable for an ... |
Topic: int RC clock good enough for serial comms? |
Don P
Replies: 6
Views: 9053
|
Forum: General CCS C Discussion Posted: Fri Mar 25, 2005 9:12 am Subject: int RC clock good enough for serial comms? |
Searching the archives didn't net me any subject lines that looked relevant.
On the 16F628 the internal clock is nice because it frees up board space & I/O pins, and works fine for many apps with ... |
Topic: 21 bit max ? ! |
Don P
Replies: 6
Views: 10841
|
Forum: General CCS C Discussion Posted: Tue Jan 25, 2005 10:32 pm Subject: 21 bit max ? ! |
OK, unless it's a free upgrade, I can live with it. |
Topic: 21 bit max ? ! |
Don P
Replies: 6
Views: 10841
|
Forum: General CCS C Discussion Posted: Tue Jan 25, 2005 9:35 pm Subject: 21 bit max ? ! |
Ah ha !
ver 3.152 |
Topic: 21 bit max ? ! |
Don P
Replies: 6
Views: 10841
|
Forum: General CCS C Discussion Posted: Tue Jan 25, 2005 7:41 pm Subject: 21 bit max ? ! |
#include <16F628.h>
int32 X ;
void Main()
{
X = 0b11110000111100001 ; // add another digit and you get
// *** Error 76 "junk.c" Line 5(24,25): Expect ;
}
I used to know where to f ... |
Topic: 21 bit max ? ! |
Don P
Replies: 6
Views: 10841
|
Forum: General CCS C Discussion Posted: Tue Jan 25, 2005 6:39 pm Subject: 21 bit max ? ! |
I define a variable as int32.
Using "0b" binary notation to equate it to a constant, it won't compile if I specify more than 21 bits. Is this known?
Regards,
Don |
|