I'm using PBP3 (MPLAB 8.9) with a 18F2550 and trying to use the SSPCON registers to set it up for hardware SPI. I get bad data type error. Is SSPCON not supported on this chip?
I've also tried it...
Type: Posts; User: Ryan7777; Keyword(s):
I'm using PBP3 (MPLAB 8.9) with a 18F2550 and trying to use the SSPCON registers to set it up for hardware SPI. I get bad data type error. Is SSPCON not supported on this chip?
I've also tried it...
Thanks so much, Dave!
Works great!
This is what I ended up with just in case someone else ever needs to know:
DataIn VAR WORD
DataInLong VAR LONG
Hi all,
I am reading a 0-10VDC signal with a 16-bit ADC.
So I am taking the LONG (just in case I need the room later) variable that I am reading that 16bit number into, lets say 10 volts for...
It's been a while, but I'd agree about
u8 msb;
u8 lsb;
as being declarations of those variables in each function and what they will hold.
Those whole thing just looks like it's reading in...
I have an odd problem with SERIN and SEROUT in that to get them to work, I often times, if not always have to send my command to the receiving PIC or device twice in order to get any kind of action...
Awesome stuff guys!
Yes, when I got in and tried the thought that I had of just clocking in the set up register stuff first:
nCSA = 0 'Enable MCP23S17-A
SHIFTOUT SDO,...
Your open pins were probably acting like little antennas and picking up something nearby on occasion that just happened to be what the pic was expecting as an OSC frequency, hence the occasional...
I have an o'scope on the fiber transmitter and say I want the fiber signal to look like this (in ones and zeros, the fiber signal is actually two different widths to represent 1 or 0):
...
Hello all!
I am using a couple of MCP23S17's with a PIC18F2320 in order to communicate with a circuit that converts a 24 bit parallel output from the MCP23S17's to a fiber optic signal.
The...
After reading what I could of the datasheet, this looks like a variant of the WS2801 to me.
Also looking closer at your code, you may need to set your TRIS to output and input on the proper pins....
I have a bunch of experience with the WS2801 based strips, which you can run using shiftout pretty easy. You basically shift in your bits on the data line with each pulse of the clock line if i...
Nope,
It didn't work. I did catch a few mistakes as soon as I posted that. Like needing to comment my assembly stuff with ";" for example. And never flipping "FirstCapt" back after looking for the...
Sorry to keep beating on this post! I just really want to figure this out and having support is nice. Also, this is what I do on my lunch break ha-ha... So I write everthing in notepad, post it here...
Thanks Dave!
This is what is actually working for me thus far! At least some success:
INCLUDE "DT_INTS-18.bas" ; Base Interrupt System
INCLUDE "ReEnterPBP-18.bas" ; Include if...
I have TMR0 set to 8 bit mode actually T0CON = %11000111.
Changing the prescaler to either 128 or 64 seemed to speed it up. I can't seem to get to 60Hz no matter what I do.
I tried porting over...
Ok,
Just focusing on getting 60Hz out of the thing. kind of left the other code in there knowing it probably won't work completely until I rewrite it, but....
I fixed ADCON1 (= 7) and TRISB...
Alright, you caught me!
I wrote that, or rather pieced it together when I should have been going to bed for the evening. It does have the typical “noob” mistakes of not turning the analog inputs...
Ok,
Super big thanks Henrik for helping me get this working on a 16F648A!
It seems to do ok, but of course I can’t leave well enough alone.
The 16F648A code does what I need, but has some...
Henrik,
That looks awesome! I will try it this weekend when I get some time.
I did get it to work on an 18F2320 by taking the first bit of code that Bruce posted in the link in my initial post...
Ok,
Sorry I didn’t get back to my issue at hand. I was pretty bummed and just wasn’t feeling it yesterday.
Anyway…
I have two circuits that are identical. They are both clocked with a...
Wow, I am shocked speechless.
I have used Darrel's gifts to the PBP world for years now. Most of what I have done with PBP has had some kind of help or influence from Darrel, if not robbing his...
Hello all,
I need to measure the time between two different pulses leading edges.
The trigger pulse is a 60 Hz square wave with a 8.228mS width, 50% duty that is currently being generated by...
Hey! thanks Henrik!!! I seriously meant to get back to that but got hung up on other issues and it got lost in the bottom of my pile of a million things to get done. I did get my code working in...
Sorry for not getting back to this. I've had my logic analyzer tied up for something else and haven't been able to get back to that project let alone this one due to some things beyond my control. I...
I'll maybe try both ways and break out my logic analyzer. I get confused with the MSB/LSB stuff though. I guess the analyzer captures on the screen the first bit it sees on the left hand side of the...