Hello
I am using portD as a data port, 4 bits of portA as an address bus, and porte as the chip select, data strobe and direction bits. When the data switch from 3F to 40, 7F to 80, and BF to C0 there is a glitch. The data bus shows a few values before settling, but what is odd is the address bus, which isn't being changed or written to in any way also sees a glitch then settles back to the address it should have and likewise I get a 4ns pulse on the Chip Select and Data Strobe bits.
#Config
CONFIG OSC = HS ;Sets for external oscillator HS = external oscillator high speed Internal = IRCIO67
#endconfig
DEFINE OSC 20 'Sets Osc to 20MHZ
'Setup
ADCON0 = $00 'Disables A/D module
ADCON1 = $0F 'Sets inputs to digital
CMCON = $07 'Takes pins D<3:0> to digital from default PW mode
CCP1CON = $00
ECCP1CON = $00
INTCON = %00111111
define HSER_BAUD 38400
DEFINE NO_CLRWDT 1
Do until x = Length
'Set data bus
LATD = X
'Set the direction
PORTE.2 = 0
'Select the chip
PORTE.0 = 0
'Strobe the data
PORTE.1 = 0
'Disable strobe 'At 8mhz this is active for 1uS at 20mhz this is active for 400nS
PORTE.1 = 1
PORTE.0 = 1
PORTE.2 = 1
x = x + 1
loop
Attachment 8932
I am using portD as a data port, 4 bits of portA as an address bus, and porte as the chip select, data strobe and direction bits. When the data switch from 3F to 40, 7F to 80, and BF to C0 there is a glitch. The data bus shows a few values before settling, but what is odd is the address bus, which isn't being changed or written to in any way also sees a glitch then settles back to the address it should have and likewise I get a 4ns pulse on the Chip Select and Data Strobe bits.
#Config
CONFIG OSC = HS ;Sets for external oscillator HS = external oscillator high speed Internal = IRCIO67
#endconfig
DEFINE OSC 20 'Sets Osc to 20MHZ
'Setup
ADCON0 = $00 'Disables A/D module
ADCON1 = $0F 'Sets inputs to digital
CMCON = $07 'Takes pins D<3:0> to digital from default PW mode
CCP1CON = $00
ECCP1CON = $00
INTCON = %00111111
define HSER_BAUD 38400
DEFINE NO_CLRWDT 1
Do until x = Length
'Set data bus
LATD = X
'Set the direction
PORTE.2 = 0
'Select the chip
PORTE.0 = 0
'Strobe the data
PORTE.1 = 0
'Disable strobe 'At 8mhz this is active for 1uS at 20mhz this is active for 400nS
PORTE.1 = 1
PORTE.0 = 1
PORTE.2 = 1
x = x + 1
loop
Attachment 8932