欢迎访问ic37.com |
会员登录 免费注册
发布采购

EPM240T100C5N 参数 Datasheet PDF下载

EPM240T100C5N图片预览
型号: EPM240T100C5N
PDF下载: 下载PDF文件 查看货源
内容描述: [暂无描述]
分类和应用: 可编程逻辑器件输入元件PC
文件页数/大小: 295 页 / 3815 K
品牌: ALTERA [ ALTERA CORPORATION ]
 浏览型号EPM240T100C5N的Datasheet PDF文件第241页浏览型号EPM240T100C5N的Datasheet PDF文件第242页浏览型号EPM240T100C5N的Datasheet PDF文件第243页浏览型号EPM240T100C5N的Datasheet PDF文件第244页浏览型号EPM240T100C5N的Datasheet PDF文件第246页浏览型号EPM240T100C5N的Datasheet PDF文件第247页浏览型号EPM240T100C5N的Datasheet PDF文件第248页浏览型号EPM240T100C5N的Datasheet PDF文件第249页  
Chapter 14: Using Jam STAPL for ISP via an Embedded Processor  
14–9  
Software Development  
Step 1: Set Preprocessor Statements to Exclude Extraneous Code  
At the top of jbistub.c, change the default PORTparameter to EMBEDDEDto eliminate  
all DOS, Windows, and UNIX source code and included libraries.  
#define PORT EMBEDDED  
Step 2: Map JTAG Signals to Hardware Pins  
The jbi_jtag_io()function contains the code that sends and receives the binary  
programming data. Each of the four JTAG signals should be re-mapped to the  
embedded processor’s pins. By default, the source code writes to the PC’s parallel  
port. The jbi_jtag_io()signal maps the JTAG pins to the PC parallel port registers  
shown in Figure 14–6.  
Figure 14–6. Default PC Parallel Port Signal Mapping (Note 1)  
7
0
6
TDI  
X
5
0
4
3
2
1
0
I/O Port  
0
0
0
TMS TCK OUTPUT DATA -  
Base Address  
TDO  
X
X
X
---  
---  
---  
INPUT DATA -  
Base Address + 1  
Note to Figure 14–6:  
(1) The PC parallel port hardware inverts the most significant bit, TDO.  
The mapping is highlighted in the following jbi_jtag_io() source code:  
int jbi_jtag_io(int tms, int tdi, int read_tdo)  
{
int data=0;  
int tdo=0;  
if (!jtag_hardware_initialized)  
{
initialize_jtag_hardware();  
jtag_hardware_initialized=TRUE;  
}
data = ((tdi?0x40:0)|(tms?0x2:0));  
/*TDI,TMS*/  
write_byteblaster(0,data);  
if (read_tdo)  
{
tdo=(read_byteblaster(1)&0x80)?0:1; /*TDO*/  
}
write_blaster(0,data|0x01); /*TCK*/  
write_blaster(0,data);  
return (tdo);  
}
In the previous code, the PC parallel port inverts the actual value of TDO. The  
jbi_jtag_io()source code inverts it again to retrieve the original data. The line  
which inverts the TDOvalue is as follows:  
tdo=(read_byteblaster(1)&0x80)?0:1;  
© October 2008 Altera Corporation  
MAX II Device Handbook