[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xylo-SDR] dsPIC
Thanks Leon, there are significant differences between the "PS" "prototype
samples" and the final production chips. I couldn't get the SPI interface to
work at all, no data. If you do, please let me know how :-) Also the Open
Drain outputs are not on the PS chip. I'm having great success with the
other functions though. I have to turn the PLL off to make the in circuit
debugger work. I don't know what that is all about. I can run the chip at
40.5504 MIPS with a 4.9152 MHz crystal and PLL 33 X using the programmer. I
disable the PLL to run the Debugger. But it really helped me to debug this
keyboard interrupt routine this morning. I could breakpoint on the Scan code
"key_char". Ended up bumping the CNIP priority to 5 so the 131 KHz timer
interrupt wouldn't clobber it :-)
/*======================================================================
dsPIC33F_SDR_CN_isr
John H. Fisher K5JHF
Began On: 11/23/2005
Current Date: 12/18/2005
======================================================================*/
#include <p33FJ128GP706PS.h>
#include <dsPIC33F_SDR.h>
/*======================================================================
; U2RX /SDA2/CN17/RF4 pin 31 = Keyboard Clock In
; U2TX/SCL2/CN18/RF5 pin 32 = Keyboard Data In
======================================================================*/
#define Key_Clock PORTFbits.RF4
#define Key_Data PORTFbits.RF5
/*======================================================================*/
void __attribute__((__interrupt__)) _CNInterrupt( void ) {
static unsigned char key_count = 0, key_char = 0;
IFS1bits.CNIF = 0;
if ( Key_Clock ) return; /* Ignore Rising Edge */
switch ( ++key_count ) {
case 1: /* Ignore Start Bit */
return;
case 10: /* Ignore Parity Bit */
return;
case 11: /* Use Data Some Way */
key_count = 0;
/* Decode Scan Code Here */
return;
default: /* Shift In Data Bits */
key_char >>= 1;
if (Key_Data) key_char |= 0x080;
}
}
/*======================================================================*/
----- Original Message -----
From: "Leon Heller" <leon.heller@bulldoghome.com>
To: "Xylo-SDR Discussion" <xylo-sdr@lists.ae5k.us>
Sent: Monday, December 19, 2005 12:56 PM
Subject: [Xylo-SDR] dsPIC
I've just checked the docs on the CD-ROM: PS *does* denote Product Sample,
and they will providing upgrades.
Leon
--
Forum pages: http://www.hamsdr.com/hamsdrforum/
Regards,
John
=========================================================
email: k5jhf@sbcglobal.net
photos: http://photos.yahoo.com/k5jhf@sbcglobal.net
files: http://briefcase.yahoo.com/k5jhf@sbcglobal.net
web page: http://www.geocities.com/k5jhf@sbcglobal.net
call sign: K5JHF
=========================================================