Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 14:15 08 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : 16F628A VREF

Author Message
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 02:06am 01 Jun 2013
Copy link to clipboard 
Print this post

Wondering if someone can give me a hand.

I am trying to affect the VREF or voltage reference in a 16F628A

I am addressing TRISA / CMCON and VRCON

Anyone used this before ?

Supposed to be a switched ladder network that provides a volts on RA2 Pin 1 VREF

- Andrew -
Andrew Rich VK4TEC
www.tech-software.net
 
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 02:26am 01 Jun 2013
Copy link to clipboard 
Print this post

Sorted - CRO was on AC coupling instead of DC - Doh

movlw 0x02
movwf CMCON
bsf STATUS,RP0
movlw 0x07
movwf TRISA
movlw b'11001111'
movwf VRCON
bcf STATUS,RP0

loop

bsf STATUS,RP0
decf VRCON,1 ; count down 16 steps of volts
bcf STATUS,RP0
call longdelay
call longdelay
goto loop

Andrew Rich VK4TEC
www.tech-software.net
 
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 02:34am 01 Jun 2013
Copy link to clipboard 
Print this post

  Quote  Sorted - CRO was on AC coupling instead of DC - Doh


How often have we done that in the past? Spend hours looking for a fault that doesn't exist.

Do you have a specific project you are working with the VREF on? Or just tinkering?




David M.
 
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 02:54am 01 Jun 2013
Copy link to clipboard 
Print this post

I am just teaching myself a bit more about the PIC

I did have an idea, Ham Radio operators have been using RTTY on SSB on UHF for baloon launches. Sending GPS data from aloft.

The Freq shift is achieved by hitting an FM module with two seperate voltage levels.

Hence trying to underatand the VREF . Getting a Freq shift on SSB on a scanner.

FL-DIGI is the sofwtware for decode.

Some info

http://ukhas.org.uk/guides:linkingarduinotontx2

- Andrew - Edited by vk4tec 2013-06-02
Andrew Rich VK4TEC
www.tech-software.net
 
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 01:10pm 01 Jun 2013
Copy link to clipboard 
Print this post

Hi Andrew,

I had a read through the link on arduino and the rtty. It took me back to my old RAN electronics days. All the main comms was done using FSK or FST of one sort or another. Multi channel SSB broadcast, cryptographics, 40Kwatt HF TXs... Ahhhh.....memories.

Was there any particular reason you are using the PIC16F628A MCU? It is rather limited in the AtoD and EEprom department. It only has comparators and a variable VREF. It also doesn't have I2C if you want to head in that direction.

I have found that the PIC16F88 is a far more versatile chip and is usually somewhat cheaper.

You can still do I2C on a 628A but you need a bit of external hardware (inverter and RC)and interrupt driven firmware. If you are interested some time, I've already been down those paths.

Meanwhile, I'll follow your current project, it looks interesting.
David M.
 
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 01:50pm 01 Jun 2013
Copy link to clipboard 
Print this post

16F628A - Just because the local JayCar sold them and I was trained on them.

And the local store had SMD versions - So i made a surface mount project as well.

I also play with the 16F877A

I pretty much do just data - USART and the likes

With a bit of LCD and SD card stuff.

Radio telemetry interests me.

I have a DunioMote, MiniMaximite x3

Had the MaxiMite and several others.

- Andrew -
Andrew Rich VK4TEC
www.tech-software.net
 
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 07:25pm 01 Jun 2013
Copy link to clipboard 
Print this post

I downloaded the PIC16F877A data sheet. It looks a pretty versatile sort of chip. A lot like the F88 with extra ports but quite physically larger.

Have you played with the I2C function? - its amazing how many devices one can hang off two pins and at 100Kb/s is somewhat faster than USART. Great for LCD, ASCII keypad, adc, etc..
David M.
 
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 11:03pm 01 Jun 2013
Copy link to clipboard 
Print this post

No I have managed to avoid I2C

I have done 4 bit LCD and the like.

- Andrew -
Andrew Rich VK4TEC
www.tech-software.net
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024