pic telemetry system


Closed Thread
Results 1 to 24 of 24

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by comwarrior View Post
    @ joe - Knowledge, but no wisdom = unhelpful
    Practice what you preach and look at my profile it will tell you how old i am...

    @mel - completely avoided the question you tried (and failed) to answer = unhelpful
    I allready know it's set to 5 volts... the question was what do you use to measure more than 5 volts?

    Do you two really think I’d post here without spending days trying to find the info myself? that single one liner "...when i was 13 i was writing large BASIC programs on my spectrum and have since gone on to HTML, CSS, PHP..." should tell you I’m an experienced programmer capable of learning on my own and know to check with people that are 'supposedly' in the know to make sure I’m on the right tracks...

    So far, I’m not impressed...
    Your second post and you are already offending the people trying to help you. Hmm ... Comwarrior, interesting choice for a name given these three postings. Perhaps you should stick with the advice given in the first reply, and use the search tools you were offered instead.

    I'm with Joe, I would have guessed 16. 27? Really?
    http://www.scalerobotics.com

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    I cant' resist!

    If 13th on a Spectrum (around 1983) now maybe 40 something. But this does not have to do with the attitude. Either you have it or not.

    Being polite is a way of life.

    Anyway, I do respect every member of this forum, but some deserve a little extra like Melanie.

    Did not got exactly all the answers? Why not re-ask? No hurt. Blaiming for un-helpful and no-one is going to help in the future. Why bother? Our time is precious besides...

    1. Set up is fine.

    2. You got it. But consider to use (if you don't) the Usart for most efficient way to send receive data and also interrupts (look for DT-INTS on the forum).

    3. As stated a resistive voltage divider is all that is needed. Simple ohms law to find the values according to your Vin/Vout needs.

    Ioannis

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by scalerobotics View Post
    Perhaps you should stick with the advice given in the first reply, and use the search tools you were offered instead.

    I'm with Joe, I would have guessed 16. 27? Really?
    I dunno, maybe he thought the Google link was the standard Google and not a PICBASIC custom link, I was guessing 17, really what adult talks about their code exploits at 13 anyway? Usually I test the code and pour over the data sheets, didn't have time, but I know everything HE is looking for is here already. Keep handin' out those fish Ioannis, I am sure the recipients appreciate them. Maybe YOU CAN impress him. , funny, I never even thought of trying to impress anybody,incidentally, to everyone who has EVER Tried to help me, Thank You.
    JS
    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.

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    ...really what adult talks about their code exploits at 13 anyway?
    ... the ones that have been programming for fun since an early age and know a few languages...

    As for atitude, as i allready said, i'm considerd a pro or expert or guru in various other forums and i'd be ashamed of myself if i answerd a newby's question like that...

    Quote Originally Posted by Ioannis
    Did not got exactly all the answers? Why not re-ask? No hurt. Blaiming for un-helpful and no-one is going to help in the future. Why bother? Our time is precious besides...

    1. Set up is fine.

    2. You got it. But consider to use (if you don't) the Usart for most efficient way to send receive data and also interrupts (look for DT-INTS on the forum).

    3. As stated a resistive voltage divider is all that is needed. Simple ohms law to find the values according to your Vin/Vout needs.

    Ioannis
    Ioannis, thank you, direct answer saves time...

    I'd actually ruled out using a resister type voltage devider for the reason that it draws curent from the source your measuring... I had thaught of an opamp or another type of amplifier...


    What i'm intensly looking at and trying to resolve is a little problem i seem to have with the data coming out of both hardware and software comm ports in oshonsoft's PIC simulator IDE... dispite having Baud, stop bit and parity correct I regularly get glifs coming out of the ports... but the two ports have gilfs in diferent places... and the software port reciever is reporting stop bit errors????? weird... must be a config error somewhere, thinking about it, I wonder if stop bit/parity is set to none if pic's allow it... meh, i'f sure it's a conf error, i'll find it...

    Thanks to...
    Ioannis & Dave

    Also, I think the PBP way of handling interupts is stupid... you should be allowed to write interupt handlers in PB without PBP inserting all that extra code...

    X

  5. #5
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    comwarrior, I have never seen in my 40+ years of hardware where you would have a start bit and no stop bit.. I would check the frequency being sent to the baudrate generator (clock) and see if it needs some adjustment..

    Dave Purola,
    N8NTA

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by comwarrior View Post
    I'd actually ruled out using a resister type voltage devider for the reason that it draws curent from the source your measuring... I had thaught of an opamp or another type of amplifier...
    Then use higher value resistors (Mohms) and a suitable opamp as an unity gain buffer, like the LMC662 series (rail to rail).


    Quote Originally Posted by comwarrior View Post
    Also, I think the PBP way of handling interupts is stupid... you should be allowed to write interupt handlers in PB without PBP inserting all that extra code...
    Read my post again. Answer is DT-INTS. It has nothing to do with PBP interrupts. Credits go to Darrel Taylor for his great contribution. Look also his site www.pbpgroup.com for the software.

    Ioannis

    P.S. I still have that old ZX Spectrum and Zeus assembler. What days was those...

  7. #7


    Did you find this post helpful? Yes | No

    Default

    ok, i see what your saying for interupt handling and i'll read more when i get fedup trying to sort the comms out...

    here is a little test program i've done to try and debug the problem with the serial comms...

    Code:
    include "modedefs.bas"
    include "bs1defs.bas"
    Define CONF_WORD = 	0x3d71
    Define  OSC				4				' Set clock speed
    
    Define  ADC_BITS        10     			' Set number of bits in result
    Define  ADC_CLOCK       3     			' Set clock source (3=rc)
    Define  ADC_SAMPLEUS    50    			' Set sampling time in uS
    
    SPBRG = 25              ' Set baud rate to 2400
    RCSTA = %10010000       ' Enable serial port and continuous receive
    TXSTA = %00100000       ' Enable transmit and asynchronous mode
    
    RCSTA = %10010000       ' Enable serial port and continuous receive
    TXSTA = %00100000       ' Enable transmit and asynchronous mode
    
    ADT1 var word							' Create ADT1 to store curent ad conversion for AD channel 0
    ADT2 var word                   		' Create ADT2 to store curent ad conversion for AD channel 1
    ADT1MAX var word						' Create ADT1MAX to store curent ADC0 max val
    ADT1MAX = 0
    ADT2MAX var word						' Create ADT2MAX to store curent ADC1 max val
    ADT2MAX = 0
    ADT1VAL var word
    ADT1VAL = 0
    ADT2VAL var word
    ADT2VAL = 0
    ADV1 var word
    
    TRISE = 255							' Set PortE to all inputs
    TRISD = 0							' Set PortD to all outputs
    TRISC = 0							' Set PortC to all outputs
    TRISB = 0							' Set PortB to all outputs
    TRISA = 255 						' Set PORTA to all input
    ADCON1 = 0 							' PORTA is analog
    
    HSEROUT [" initialised",10,13]
    SEROUT PORTB.1,t9600,[" initialised",10,13]
    
    Loop:
    ADCIN 0, ADT1
    HSEROUT [DEC5 ADT1,10,13]
    SEROUT PORTB.1,t9600,[#ADT1,10]
    goto Loop
    end
    From software UART i get...

    Code:
    +¥ֻ±Í•´
    0
    0
    software uart output is reporting incorrect stop bits when it sends the "initialising" stream...

    I should re-point out, i'm experimenting in a PIC simulator untill i get the right output...
    i have a pair of 16F877's due to arive tomarow and JDM programmer and max232 converts (serial and USB versions) due to arive at any time...

    I know i've not included the half second pause for ADC...
    so, what have i missed out from my initialisations?

    Thanks

  8. #8


    Did you find this post helpful? Yes | No

    Default

    and now... i'm having Floting Point Math 'issues' too...

    FPM sux...

  9. #9


    Did you find this post helpful? Yes | No

    Default

    ok, i got it to output the voltage... so, the analog input now output as a voltage over serial connection... so i'm posting my code for anyone else that wants to use it...

    Code:
    Loop:
    ADCIN 0, ADT1
    ADT1 = ADT1 / 64
    VARHIGH = ((48 * ADT1) / 10000)
    VARLOW = ((48 * ADT1) - (((48 * ADT1) / 10000) * 10000)) / 100
    
    HSEROUT ["DEC: ", DEC5 ADT1," V: ",DEC5 VARHIGH,".",DEC5 VARLOW,10]
    GOTO Loop:
    It's actually reading 2% low in the simulation... but thats good enough for me... may be a completely diferent case when in hardware...

Similar Threads

  1. SMS via pic
    By kenandere in forum GSM
    Replies: 15
    Last Post: - 10th March 2010, 10:00
  2. pic to pic ir link versus wired link : help please anyone
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th May 2008, 21:01
  3. PIC16F877A - Timer0 won't interrupt
    By WishMaster^ in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 25th April 2007, 08:25
  4. calibration clock 12f508
    By volcane in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th December 2006, 10:33
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts