HobbyPCB.com

Built by Hobbyist for Hobbyist!
It is currently Sat Aug 24, 2019 9:52 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Sat Sep 29, 2012 1:21 pm 
Offline

Joined: Thu Aug 09, 2012 6:16 pm
Posts: 43
Hey Jim

I using MPLAB and when I attempt to program 18F45K22 in-situ the software complains with "Target Device ID (00000000) does not match expected Device ID (00005500)." which is just as if it is not connected. I have the PICKIT3 set up to supply voltage to the target (about 4.7V under load in situ) but I cannot get it to connect - looking at the diagram I see a lot of things connected to 5VD so more than just the PIC are powered up on the ICSP header.

I do know I have it connected correctly as I can program/verify the DSPIC33 in-situ. When I remove the PIC and put it in a ZIF socket on the programmer, it programs NP and then works in circuit.

So the question is- have you successfully programmed the PIC18F in-situ on this board, and if so any idea what could keep it from working for me?

I have checked the SPI to the SIS570 seems to work as you described in a previous post, as do the SPI to the AD9833 when mode/PBT changes. I just have no output on the AD9833 so perhaps I got it too hot. The board layout makes one heck of a heatsink for it.

You mentioned in the "it's alive" post you are using an optical encoder for the VFO- could you share the part number/specs - or point me to the code section/file to find the settings?

FWIW I am using the published code from QST- NOT the code on your google site.

Thanks and 73

Bill N4BKT


Top
 Profile  
 
PostPosted: Sun Sep 30, 2012 2:04 pm 
Offline

Joined: Mon Jul 23, 2012 6:25 am
Posts: 1143
Hi Bill,

Yes I program the PIC18F on the board all the time. There are 2 coditions first you have to disconnect the encoders, they share the same lines as the programming interface and can interfere with the PICKIT. Second the PICKIT doesn't have enough power to power-up the PCB so you have to supply external power to the board.

A Mouser 652-EM14A0D-C24-L32N would be a nice encoder, basically you want 20-40 pulses per revolution (the frequency increments 4X for every pulse), no detents, panel mount. Generally it will need 5V but the RIT and RF Gain pots have 5V on them.

The SI570 uses I2C which is a little different from the SPI going to the AD9833, The AD9833 is the most difficult part in the entire radio to mount so if it's not working it's a good bet that it's not attached. Try the 'flow it like crazy, clean it up with solder wick' approach.

The code on the ARRL site is the same as that on the Google site, there's no coding difference between a mechanical or optical encoder.

73's
Jim


Top
 Profile  
 
PostPosted: Sun Sep 30, 2012 6:00 pm 
Offline

Joined: Thu Aug 09, 2012 6:16 pm
Posts: 43
Thanks Jim- I sorted it out- the 100nF caps for the encoders were snubbing the signal on PGC/PGD- so once removed the programmer connects. So the snubbers caps should be added to the encoder end rather than the main board.

I have verified on the scope the SI570 has three frequencies with band change going to the mixer on pin 8 and looks perfect.

The AD9833 was removed and refitted- it looked prettier soldered before the refit but fine now too. I do see some changes with keypress/band change but it looks like noise fed through from the ref osc- same as before removal and refit. The only way I can do it is with a glob and solder-wik. Wish the footprint was a bit wider, as the fiducials surrounding the ground plane.

I do have a question (two).

1. I have no S-meter indication on the display until I poke around the DSP MCLR pin- then I hear some background noise and the S0 and "S" appear I also note D3/D4 light up too. In the code looks like it waits for DataRdy1USART() && TX == 0 in main.c before updating S meter the first time - may be a related symptom or is this all because the 9833 has no output?

2. Also in main.c - Is see you RA4 when pin 6 is not connected? Is this just a leftover perhaps?

#pragma interrupt InterruptHandlerHigh
void InterruptHandlerHigh (void)
{
unsigned char New_PB, Diff_PB, A, B, C;
INTCONbits.GIE = 0;
PORTAbits.RA4 = 1;
if (INTCONbits.RBIF == 1)


I have very low level output on the AD9833 ~350mVDC. I have the 2.5V on ref and about 3.6vdc on comp. I just have no output. When I open the clock line output toggles to 5V randomly.

So what I have is the S-Meter weirdness, VFO encoder encoder weird (now I wonder if I had those caps on the optical encoder I tried) and no operation of the AD9833. I suppose I can try another AD9833 but in my experience the device may well be OK as it does *something* . On the plus side- I'm learning *something* like PIC conventions... time to look at spec sheets further.


Thanks for the help Jim, and tolerating these silly questions over your code. It looks very well done, FWIW coming from a non-programmer. :-)

73
Bill
N4BKT


jimveatch wrote:
Hi Bill,

Yes I program the PIC18F on the board all the time. There are 2 coditions first you have to disconnect the encoders, they share the same lines as the programming interface and can interfere with the PICKIT. Second the PICKIT doesn't have enough power to power-up the PCB so you have to supply external power to the board.

A Mouser 652-EM14A0D-C24-L32N would be a nice encoder, basically you want 20-40 pulses per revolution (the frequency increments 4X for every pulse), no detents, panel mount. Generally it will need 5V but the RIT and RF Gain pots have 5V on them.

The SI570 uses I2C which is a little different from the SPI going to the AD9833, The AD9833 is the most difficult part in the entire radio to mount so if it's not working it's a good bet that it's not attached. Try the 'flow it like crazy, clean it up with solder wick' approach.

The code on the ARRL site is the same as that on the Google site, there's no coding difference between a mechanical or optical encoder.

73's
Jim


Top
 Profile  
 
PostPosted: Sun Sep 30, 2012 6:12 pm 
Offline

Joined: Thu Aug 09, 2012 6:16 pm
Posts: 43
FWIW- I just tried the optical encoder and without the 100nf caps the PIC promptly crashes. Not sure how much effect any optical encoder will have on this symptom. Perhaps this will clear once I get the 9833 running. Looks like next step is another $10 part. In hindsight I should have bought two...

Cheers,

Bill


Top
 Profile  
 
PostPosted: Sun Sep 30, 2012 6:40 pm 
Offline

Joined: Mon Jul 23, 2012 6:25 am
Posts: 1143
I've only tried one optical encoder and it worked fine, no bouncing at all. Do you have a spec for the one you are using? does it need a pull-up or pull down? It might crash pretty quickly if the encoder isn't Grey code. I have trouble thinking that it has something to do with the AD9833. The encoder is processed in the ISR so if too many interrupts are generated it overlaods the stack and crashes.

Jim.


Top
 Profile  
 
PostPosted: Sun Sep 30, 2012 10:40 pm 
Offline

Joined: Thu Aug 09, 2012 6:16 pm
Posts: 43
I do not believe the encoder is causing the AD9833 issue- but perhaps the lack of frequency input could cause some issue- your suggestion of too many interrupts causing a crash makes sense. I have no specs on the encoder but have used it on my PICaSTAR with no issue. My next step is to replace the AD9833 as I do see control signals of sorts- just no output. The glob and wick causes a tremendous amount of heat- perhaps too much with the sinking of heat on the ground plane even though it looks fine when done and cleaned.

I'll get a new AD9833 coming this week and update once the new chip is fitted. Thanks again.

73
Bill


Top
 Profile  
 
PostPosted: Mon Oct 01, 2012 10:08 am 
Offline

Joined: Thu Aug 09, 2012 6:16 pm
Posts: 43
I found the cause for the S-meter not showing - it was the DSPic33 staying in reset. Doh! - I forgot to put the ECO pull-up resistor on the board from Pin 1 to 18 of U9! I used a 1K2 for a pull-up. I will cross post this to the ECO thread. Some progress now.

Now I hear noise in the speaker and the S-Meter is there directly so there is just the dead AD9833 to tackle.


Top
 Profile  
 
PostPosted: Wed Oct 31, 2012 4:43 pm 
Offline

Joined: Thu Aug 23, 2012 1:24 pm
Posts: 23
Just a note on the 652-EM14A0D-C24-L32N optical encoder. Mouser also sells a cable with a connector on one end for this encoder. The manufacturer's number is H-190-2. Mouser's part number is 652-H-190-2 and the price is $3.73 for 1.

Bob


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group