Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

How do I load multiple scripts into NVM?

Avatar
RankRankRankRank

Total Posts: 140

Joined 2008-12-09

PM

The NVM is organized in sequentially numbered sectors (pages), providing the user the ability to store multiple scripts for selection at operation time. Sectors are delimited on a script using the End of Sector flag. Sector 0 is always executed, and the sector selected by pins DevlSel1-3 will be executed after the Read Pins for Sector command.

For example, the following script configures a shared slave. Page 0 is executed initially, and the next page to be executed depends on the external pin configuration.

C [91][00][00][40][FF][01][00]     // Configuring Data Channel 0 on ANT Channel 0 as Digital Input using pin(s) FF reporting on 100.00% of messages
C [90][00][01][FF][00][FF]     // Set ANT Channel 0 Input Mask to Digital, using input mask FF
C [42][00][20][00]     // Assign Shared Channel Slave on ANT chanel 0 on network 0
C [51][00][31][00][01][03]     // Assign Channel ID 0, Dev. Num = 49, Dev. Type = 1, Trans. Type = 3
C [43][00][00][20]     // Set ANT Channel 0 Message Period to  4.00 Hz
C [45][00][42]     // Set ANT Channel 0 RF Frequency to 2466 MHz
C [92][00]   // Read pins for sector
E   // End sector (Global Page)

// Page 1 - Assign shared address 1
C [95][00][00][01][00]     // Set ANT Channel 0 Shared Address to Manual Address 1
C [4B][00]     // Open ANT chanel 0
E   // End sector 

// Page 2 â?? Assign shared address 2
C [95][00][00][02][00]     // Set ANT Channel 0 Shared Address to Manual Address 2
C [4B][00]     // Open ANT chanel 0
E   // End sector 

// Page 3 - Assign shared address 3
C [95][00][00][03][00]     // Set ANT Channel 0 Shared Address to Manual Address 3
C [4B][00]     // Open ANT chanel 0
E   // End sector 

// Page 4 â?? Assign shared address 4
C [95][00][00][04][00]     // Set ANT Channel 0 Shared Address to Manual Address 4
C [4B][00]     // Open ANT chanel 0
E   // End sector 
     

Signature

For a complete list of frequently asked questions and answers, please view the FAQ user profile by clicking on the FAQ user name.