Author |
Message |
Topic: pic 12F615 uart / clock issues, delay does not seem to work |
zonemikel
Replies: 8
Views: 12605
|
Forum: General CCS C Discussion Posted: Tue Mar 15, 2011 5:53 pm Subject: pic 12F615 uart / clock issues, delay does not seem to work |
Just confirming it works exactly as pcm programmer said, thanks ! |
Topic: pic 12F615 uart / clock issues, delay does not seem to work |
zonemikel
Replies: 8
Views: 12605
|
Forum: General CCS C Discussion Posted: Sun Mar 13, 2011 9:36 pm Subject: pic 12F615 uart / clock issues, delay does not seem to work |
I got it working !! turns out its like twice the baud you specify. So if you specify your baud in the C #use rs232 as "4800" it will actually be "9600" and if you specify "960 ... |
Topic: pic 12F615 uart / clock issues, delay does not seem to work |
zonemikel
Replies: 8
Views: 12605
|
Forum: General CCS C Discussion Posted: Fri Mar 11, 2011 7:16 am Subject: pic 12F615 uart / clock issues, delay does not seem to work |
I have compiler 4.038, I'll try taking out the other fuse and just leave the intrc_io.
If there is a "issue" hopefully I can find a workaround. I really dont care what the clock is set t ... |
Topic: pic 12F615 uart / clock issues, delay does not seem to work |
zonemikel
Replies: 8
Views: 12605
|
Forum: General CCS C Discussion Posted: Thu Mar 10, 2011 8:44 pm Subject: pic 12F615 uart / clock issues, delay does not seem to work |
OH sorry that was something i added later. I changed it back to this
#fuses HS,INTRC_IO, NOWDT, NOPROTECT, NOBROWNOUT, PUT
#use delay(clock=4000000)
#use rs232(baud=9600,parity=N,xmit=PIN_A0,rc ... |
Topic: pic 12F615 uart / clock issues, delay does not seem to work |
zonemikel
Replies: 8
Views: 12605
|
Forum: General CCS C Discussion Posted: Thu Mar 10, 2011 7:04 pm Subject: pic 12F615 uart / clock issues, delay does not seem to work |
Hello,
I'm working with a small cheap MCU and I was using the rs232, positive its software rs232 ? Anyway if i set the clock at something like 1M and make it blink a light for a second it blinks i ... |
Topic: PWM duty is 255 100% or 1024 or ? |
zonemikel
Replies: 1
Views: 3950
|
Forum: General CCS C Discussion Posted: Wed Nov 24, 2010 10:49 pm Subject: PWM duty is 255 100% or 1024 or ? |
Ok I've been reading up on this quite a bit. I have looked into timer2 also. I'm still not sure where the PR2 value comes from, unless its the second argument in the setup_timer function.
Anyway t ... |
Topic: PWM duty is 255 100% or 1024 or ? |
zonemikel
Replies: 1
Views: 3950
|
Forum: General CCS C Discussion Posted: Wed Nov 24, 2010 9:15 pm Subject: PWM duty is 255 100% or 1024 or ? |
I've been reading up on this, I've read the data sheet and understand how setting the bits actually sets the duty cycle.
What I don't get is the 8 bit or 10 bit part. Do we set it as 8 bit or 10 b ... |
Topic: How can I tell how many bytes available while doing #int_rda |
zonemikel
Replies: 13
Views: 12624
|
Forum: General CCS C Discussion Posted: Sat Aug 28, 2010 2:28 pm Subject: How can I tell how many bytes available while doing #int_rda |
shortly after writing that post and starting to code I realized why you had a "next_in" and a "next_out" instead of just a index like me.
I ended up with this code, currently t ... |
Topic: How can I tell how many bytes available while doing #int_rda |
zonemikel
Replies: 13
Views: 12624
|
Forum: General CCS C Discussion Posted: Sat Aug 28, 2010 11:22 am Subject: How can I tell how many bytes available while doing #int_rda |
Think about this for a moment.
If the chip behaved like this, you would _never_ be able to receive single characters with interrupt driven receive code. It'd never trigger till another character ca ... |
Topic: How can I tell how many bytes available while doing #int_rda |
zonemikel
Replies: 13
Views: 12624
|
Forum: General CCS C Discussion Posted: Fri Aug 27, 2010 3:18 pm Subject: How can I tell how many bytes available while doing #int_rda |
BTW,
when I write "packet receivers" (like for GPS, say), the whole packet usually doesn't fit in the PIC's FIFO (be it 1 or 8 chars).
So figure you will have a loop that gets chars a ... |
Topic: How can I tell how many bytes available while doing #int_rda |
zonemikel
Replies: 13
Views: 12624
|
Forum: General CCS C Discussion Posted: Fri Aug 27, 2010 2:11 pm Subject: How can I tell how many bytes available while doing #int_rda |
I have a #16f887
When I have a rx interrupt #int_rda, does that mean one byte is available or how many ? Is there a register I can read to find out ? I'm trying to read a *packet* and then set the ... |
Topic: Sending "packets" using RS-232, is this a good ide |
zonemikel
Replies: 13
Views: 14172
|
Forum: General CCS C Discussion Posted: Tue Aug 24, 2010 4:06 pm Subject: Sending "packets" using RS-232, is this a good ide |
Finally found out what was wrong.
In my receiving c# program I was using ascii encoding which only supports 127 chars.
I tried switching to UTF8 and unicode but they still seem to have problem ... |
Topic: Sending "packets" using RS-232, is this a good ide |
zonemikel
Replies: 13
Views: 14172
|
Forum: General CCS C Discussion Posted: Thu Aug 19, 2010 7:43 pm Subject: Sending "packets" using RS-232, is this a good ide |
What device and/or program are you using to receive and display this data ?
Also your data above has dots (periods) in it. I don't see anything in
your test program that sends those characters.
I ... |
Topic: Sending "packets" using RS-232, is this a good ide |
zonemikel
Replies: 13
Views: 14172
|
Forum: General CCS C Discussion Posted: Thu Aug 19, 2010 5:18 pm Subject: Sending "packets" using RS-232, is this a good ide |
Well this is weird !!! Sometimes it does and sometimes it does not.
This is my code (all of it), I'm on a 16F887.
#include <16F887.h> // basic header for this pic
#device adc=8 ... |
Topic: Sending "packets" using RS-232, is this a good ide |
zonemikel
Replies: 13
Views: 14172
|
Forum: General CCS C Discussion Posted: Thu Aug 19, 2010 2:04 pm Subject: Finally found out whats wrong !!! |
well after ripping my hair out all morning i finally found out what is going wrong.
I made the pic parrot back the packet from the computer, everything works Great except . . . as soon as we get t ... |
|