Author |
Message |
Topic: rom struct forward declaration |
darkrush
Replies: 7
Views: 12784
|
Forum: General CCS C Discussion Posted: Thu Nov 07, 2013 9:02 am Subject: rom struct forward declaration |
@PCM programmer, I apologize, I compiled pointing to another project, I edited, compiled and tested again, it should work now.
@RF_Developer It's true, I was figuring that ROM and RAM addressing do ... |
Topic: rom struct forward declaration |
darkrush
Replies: 7
Views: 12784
|
Forum: General CCS C Discussion Posted: Wed Nov 06, 2013 9:48 pm Subject: rom struct forward declaration |
Thank you for your reply PCM programmer.
I edited the post, I have done many tests and was trying to put an small functional code that I made those mistakes.
I was looking at the links and under ... |
Topic: rom struct forward declaration |
darkrush
Replies: 7
Views: 12784
|
Forum: General CCS C Discussion Posted: Wed Nov 06, 2013 6:09 pm Subject: rom struct forward declaration |
This is a functional code.
config.c
#include <18F87K90.h>
#FUSES NOWDT //No Watch Dog Timer
#FUSES NOXINST //Extended set extension and Indexed Addres ... |
Topic: rom struct forward declaration |
darkrush
Replies: 7
Views: 12784
|
Forum: General CCS C Discussion Posted: Wed Nov 06, 2013 10:52 am Subject: rom struct forward declaration |
Hello,
I'm working on a menu struct stored in ROM.
I have successfully accessed the menu struct in ROM, however when I have to overload the menus I have to use "extern" which messes up ... |
Topic: Beginner problem about shifting >> or << |
darkrush
Replies: 4
Views: 6871
|
Forum: General CCS C Discussion Posted: Wed Nov 06, 2013 9:59 am Subject: Beginner problem about shifting >> or << |
I'm not sure if I can post this code.
Based on CCS manual I have always used this without problem hope it helps you.
To write:
void write32_eeprom(long int n, int32 data) {
... |
Topic: PIC16F1934 Port problem |
darkrush
Replies: 12
Views: 15606
|
Forum: General CCS C Discussion Posted: Wed Apr 18, 2012 10:13 am Subject: PIC16F1934 Port problem |
I found the mistake!
Thank you jeremiah for pointing out about the package, I have a TQFP package and I was looking at the QFN version pinout (miraculously it worked), so those 3 pins are NC pins i ... |
Topic: How to separate char? |
darkrush
Replies: 20
Views: 23080
|
Forum: General CCS C Discussion Posted: Tue Apr 17, 2012 10:54 am Subject: How to separate char? |
I know the discussion about malloc ended, but for reference add:
#include <string.h>
#include <stdlib.h>
#include <stdlibm.h>
Now to the topic, for what I have read, do you ... |
Topic: PIC16F1934 Port problem |
darkrush
Replies: 12
Views: 15606
|
Forum: General CCS C Discussion Posted: Tue Apr 17, 2012 10:14 am Subject: PIC16F1934 Port problem |
I did a couple of tests with no luck
I removed the lines I added before:
setup_comparator(NC_NC_NC_NC);
setup_vref(VREF_OFF);
setup_dac(DAC_OFF);
setup_lcd(LC ... |
Topic: PIC16F1934 Port problem |
darkrush
Replies: 12
Views: 15606
|
Forum: General CCS C Discussion Posted: Mon Apr 16, 2012 3:39 pm Subject: PIC16F1934 Port problem |
Hi again,
I double (triple) checked the hardware, a board I designed (I tested 4 boards), and tested every pin directly in the PIC to avoid external circuitry.
Also:
-I used the same signal wit ... |
Topic: How to separate char? |
darkrush
Replies: 20
Views: 23080
|
Forum: General CCS C Discussion Posted: Mon Apr 16, 2012 2:10 pm Subject: How to separate char? |
I know is off topic, but the is there any modification to the function to make it more efficient for an embedded device?
I ran many simulations before and the memory is always freed an reused witho ... |
Topic: PIC16F1934 Port problem |
darkrush
Replies: 12
Views: 15606
|
Forum: General CCS C Discussion Posted: Mon Apr 16, 2012 1:55 pm Subject: PIC16F1934 Port problem |
@asmboy I cut the code and forgot to change the loop count, is just a test code.
@PCM Programmer
as you suggested I added these lines:
setup_comparator(NC_NC_NC_NC);
setup_vref( ... |
Topic: How to separate char? |
darkrush
Replies: 20
Views: 23080
|
Forum: General CCS C Discussion Posted: Mon Apr 16, 2012 11:06 am Subject: How to separate char? |
with malloc you run the risk of memory fragmentation
Yeah, I agree with that, it happened to me, that's why you can see the "free()" after you use the function.
Xavier |
Topic: PIC16F1934 Port problem |
darkrush
Replies: 12
Views: 15606
|
Forum: General CCS C Discussion Posted: Mon Apr 16, 2012 11:00 am Subject: PIC16F1934 Port problem |
Hi PCM programmer, I'm using a total of 24 inputs (including those that works), these don't work:
RA0
RA1
RA2
RA3
RA5
RA6
RB0
RB1
RB2
RB3
RB4
RB5
RC0
RD4
RD5
RD6
RD7
RE0
RE1
RE2 ... |
Topic: How to separate char? |
darkrush
Replies: 20
Views: 23080
|
Forum: General CCS C Discussion Posted: Mon Apr 16, 2012 9:57 am Subject: How to separate char? |
you can use this function if the length is always the same.
char *strndup(char *str, size_t len)
{
register size_t n;
register char *dst;
n = strlen(str);
if ... |
Topic: Read a message over rs232 |
darkrush
Replies: 4
Views: 9611
|
Forum: General CCS C Discussion Posted: Mon Apr 16, 2012 9:41 am Subject: Read a message over rs232 |
This is an old code I found, but should be something like this:
char c;
char *proto = "$GPGGA";
#INT_RDA
void in_data(){
c = getc();
if (c == ' ... |
|