The linkage is to your PBP Manual... use the really complex schematic provided in the DEBUG section.
The linkage is to your PBP Manual... use the really complex schematic provided in the DEBUG section.
Hank, it sounds like something similiar to what I have been working on as well with regards to working with an ADC in value. I've been using a serial connection to my 16F877/16F877A. Just like you at first I had a little LED turn on with my ADC value coming in from a pressure transducer. I set it up to turn on portc.0 at 1 psi then portc.1 at 3 psi etc... Like you said that just confirmed it worked. The real work was in taking the value and converting them to a PSI value. I got some great help with that calculation and ported my actual PSI to the serial port so I could see the actual value. I had a tone of SEROUT2 commands dumping everything to a hypertermial session.
I have the schematic for the connection with the max232 rs232 chip if you need it.
David
If you have PICKIT there's no need for any RS232 level shifter, no resistor either... use the USART tool.
If you're a bit clever, you'll design your thingy to accept ICSP. And then you can also use those ICSP line for Debug with PICKIT.
That's an handy tool for less than 50$.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I uses ISIS. It simulates the code right on the computer, complete with SPICE for the electrical schematic. With PBP, I've got to watch the compiler asm output, but I can see all of the variables change and i/o pins as fast as I want, with breakpoints. When I use Proton+, I get to step through the basic code, one basic line at a time. It even gives me the option to see the assembled code between each basic line, and step through that, too.
Well, I've after two solid nights battling to get my PIC 16F690 to talk to the outside world...I've got it working
I decided I really did want some form of serout command (that I could call on demand), therefore last night I messed about with a MAX232 for a couple of hours....no success (I now realise that this was becuase I was feeding the MAX232 just 3V...sourced from the PICKIT2 VCC - it needs 5V - doh! Thanks to DavyJones for emailing me the schematics)
Anyway, the post that mister_e madecaught my attention - & I've ended up going that route. I now have PIC program going outputing to the UART window (within the PICKIT app - altough it's a little clunky if you ask me). I 've actually pimped my PICKIT2 board by soldering on a little switch which allows me to quickly switch between the PICKIT as a 'programming device' & the PICKIT 2 as a 'serial interface device' ....so no need to change the PICKIT2 edge connector now :-)
Anyway, I'm on the final straight...my query now relates to Terminal Window formatting (or rather whatever it takes to get the PICKIT 2 UART window to clear down!)
Can anyone outline (in simple terms), how I can send simple 'clear screen', line feed commands etc using the HSEROUT command?
here's a little of my code (you've not to laugh!)
ADCIN 0, DC_Level_IN ; Read the DC level on RA0 (pin 19)
HSEROUT ["ADCIN Value = ", DEC DC_Level_IN]
The problem with the above method is it's very hard on the eyes, as ithe data progresses across the screen left to right. Ideally I'd like each update to appear on a new line (or even just totally clearing the screen before the data is updated each time)
Many thanks in anticipation.
Hank.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks